Configure Microsoft Entra ID
This page provides detailed walkthroughs for federating the Amazon Cognito user pool with Microsoft Entra ID (formerly Azure Active Directory) using either OIDC or SAML 2.0. Microsoft Entra ID is the most common external identity provider for SDMA.
Before you begin, complete the prerequisites and gather your Amazon Cognito values described in Single sign-on (SSO). These procedures use the placeholders defined in Placeholders used in these procedures. For protocol-level background that applies to any identity provider, see Configure any external identity provider.
Connect Entra ID using OIDC
Step 1: Create an application registration in Entra ID
-
Sign in to the Microsoft Entra admin center
on the Microsoft website. -
Navigate to Enterprise applications > New application.
-
Choose Create your own application.
-
Enter a name for the application (for example,
Spatial Data Management). -
Select Register an application to integrate with Entra ID (App you’re developing), and then choose Create.
Step 2: Configure the application registration
-
In the application registration, add the following Redirect URI with a platform type of Web:
https://<COGNITO_DOMAIN>.auth.<REGION>.amazoncognito.com/oauth2/idpresponse
Tip
You can find the domain portion under Branding > Domain in the Amazon Cognito console. Make sure you append
/oauth2/idpresponseto the domain value. -
Choose Register.
-
On the Overview page, note the Application (client) ID and the Directory (tenant) ID. You need these values later.
Step 3: Create a client secret
-
In your registered application, choose Certificates & secrets.
-
Choose the Client secrets tab, and then choose + New client secret.
-
Enter a description (for example,
Cognito OIDC integration). -
Set an expiration (a maximum of 24 months is recommended), and then choose Add.
Important
Immediately copy the secret Value (not the Secret ID) and store it securely. The value is shown only once, and you provide it to Amazon Cognito in a later step.
Step 4: Configure API permissions
-
In your registered application, choose API permissions > Add a permission.
-
Choose Microsoft Graph > Delegated permissions.
-
Add the following permissions:
-
openid -
profile -
email
-
Step 5: Enable the groups claim
If you plan to use Entra ID groups to assign permissions in SDMA, add a groups claim to the tokens.
Entra ID includes only groups that are assigned to the application when you select Groups assigned to the application. Before you continue, assign those groups: in the Microsoft Entra admin center, choose Enterprise applications, select the application you created in Step 1, choose Users and groups, and then choose Add user/group.
-
In your registered application, choose Token configuration.
-
Choose Add groups claim.
-
Select Group ID for all token types (ID and Access).
-
Select Groups assigned to the application. This is recommended for large organizations to avoid exceeding the limit on the number of groups a token can emit.
-
Choose Save.
Step 6: (Optional) Emit group display names instead of group IDs
By default, the groups claim emits group IDs (GUIDs). To emit group display names, edit the application manifest.
-
In your registered application, choose Manifest.
-
Locate the
optionalClaimssection, and addcloud_displaynameto the groups claim foridTokenandaccessToken:"optionalClaims": { "idToken": [ { "name": "groups", "source": null, "essential": false, "additionalProperties": ["cloud_displayname"] } ], "accessToken": [ { "name": "groups", "source": null, "essential": false, "additionalProperties": ["cloud_displayname"] } ] } -
Save the modified manifest.
Step 7: Create the OIDC identity provider in Amazon Cognito
-
In the Amazon Cognito console
, choose User pools, and then select your user pool. -
Choose Sign-in experience > Federated identity provider sign-in.
-
Choose Add identity provider, and then choose OpenID Connect (OIDC).
-
Configure the following:
-
Provider name – Enter a name, for example
EntraID. This name appears on the sign-in button. -
Client ID – The Entra ID Application (client) ID from Step 2.
-
Client secret – The secret value from Step 3.
-
Authorized scopes – Enter
openid email profile(space-separated). -
Attribute request method – Keep the default (
GET). -
Issuer URL – Enter the following, replacing
<TENANT_ID>with your Directory (tenant) ID:https://login.microsoftonline.com/<TENANT_ID>/v2.0
-
-
Under Map attributes between your OpenID Connect provider and your user pool, configure the following mappings:
User pool attribute OIDC claim emailemailgiven_namegiven_namefamily_namefamily_nameusernamesub -
Choose Add identity provider.
Then enable the identity provider (Enable the identity provider for the app client) and verify the integration (Verify the integration).
Connect Entra ID using SAML 2.0
Step 1: Create an enterprise application in Entra ID
-
Sign in to the Microsoft Entra admin center
on the Microsoft website. -
Navigate to Enterprise applications > New application.
-
Choose Create your own application.
-
Enter a name for the application (for example,
Spatial Data Management SAML). -
Select Integrate any other application you don’t find in the gallery (Non-gallery), and then choose Create.
Step 2: Configure basic SAML settings
-
In the enterprise application, choose Single sign-on, and then choose SAML.
-
In the Basic SAML Configuration section, choose Edit, and enter the following (see Gather your Amazon Cognito values for these values):
-
Identifier (Entity ID) –
urn:amazon:cognito:sp:<USER_POOL_ID> -
Reply URL (Assertion Consumer Service URL) –
https://<COGNITO_DOMAIN>.auth.<REGION>.amazoncognito.com/saml2/idpresponse
-
-
Choose Save.
Step 3: Configure attributes and claims
-
In the Attributes & Claims section, choose Edit.
-
Confirm that the following claims are configured. Entra ID emits these standard claims by default:
Claim Claim name (source attribute) Email
http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddressFirst name
http://schemas.xmlsoap.org/ws/2005/05/identity/claims/givennameLast name
http://schemas.xmlsoap.org/ws/2005/05/identity/claims/surnameName
http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name -
(Optional) To use Entra ID groups for permission assignment in SDMA, add a group claim:
-
Choose Add a group claim.
-
Under Which groups associated with the user should be returned in the claim?, select Groups assigned to the application. This is recommended for large organizations to avoid exceeding the limit on the number of groups a token can emit.
-
Under Source attribute, choose the value that Entra ID emits for each group:
-
Group ID – Emits the group object ID (a GUID). This is the default.
-
Cloud-only group display names – Emits the display name for groups created in Entra ID. Choose this to emit human-readable group names instead of GUIDs.
-
sAMAccountName or
NetBIOSDomain\sAMAccountName– Emits the name for groups synchronized from on-premises Active Directory.
-
-
(Optional) Expand Advanced options to customize the claim name or to apply a group filter.
-
Choose Save.
The groups are emitted in the claim
http://schemas.microsoft.com/ws/2008/06/identity/claims/groups.Important
Whichever source attribute you choose, you must use that same value form when you assign permissions to groups in SDMA. If you emit group display names, assign SDMA access using those names; if you emit group IDs, assign access using the GUIDs. For more information, see Access Management.
-
Step 4: Obtain the identity provider metadata
-
In the SAML Certificates section, copy the App Federation Metadata Url, or choose Download next to Federation Metadata XML to download the metadata file.
You provide this metadata URL or file to Amazon Cognito in Step 6.
Step 5: Assign users and groups
-
In the enterprise application, choose Users and groups.
-
Choose Add user/group, select the users or groups who should access SDMA, and then choose Assign.
Step 6: Create the SAML identity provider in Amazon Cognito
-
In the Amazon Cognito console
, choose User pools, and then select your user pool. -
Choose Sign-in experience > Federated identity provider sign-in.
-
Choose Add identity provider, and then choose SAML.
-
Configure the following:
-
Provider name – Enter a name, for example
EntraID. This name appears on the sign-in button. -
Identifiers (optional) – Leave blank.
-
Add sign-out flow – Select this option to enable single logout.
-
Metadata document source – Choose Metadata document URL and paste the App Federation Metadata Url from Step 4, or choose Upload metadata document and upload the XML file you downloaded.
-
-
Choose Add identity provider.
-
After the identity provider is created, locate the Attribute mapping section and choose Edit. Map the SAML attributes to user pool attributes:
User pool attribute SAML attribute emailhttp://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddressgiven_namehttp://schemas.xmlsoap.org/ws/2005/05/identity/claims/givennamefamily_namehttp://schemas.xmlsoap.org/ws/2005/05/identity/claims/surnamenamehttp://schemas.xmlsoap.org/ws/2005/05/identity/claims/name -
Choose Save changes.
Then enable the identity provider (Enable the identity provider for the app client) and verify the integration (Verify the integration).