Skip to content

Commit 7559d81

Browse files
authored
Merge pull request #103935 from yoelhor/patch-10
Update to AAD v2 endpoints
2 parents 0369551 + 60fd5f6 commit 7559d81

File tree

1 file changed

+22
-13
lines changed

1 file changed

+22
-13
lines changed

articles/active-directory-b2c/identity-provider-azure-ad-single-tenant-custom.md

Lines changed: 22 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ manager: celestedg
99
ms.service: active-directory
1010
ms.workload: identity
1111
ms.topic: conceptual
12-
ms.date: 09/13/2019
12+
ms.date: 02/11/2020
1313
ms.author: marsma
1414
ms.subservice: B2C
1515
---
@@ -46,6 +46,19 @@ To enable sign-in for users from a specific Azure AD organization, you need to r
4646
1. Select **Certificates & secrets**, and then select **New client secret**.
4747
1. Enter a **Description** for the secret, select an expiration, and then select **Add**. Record the **Value** of the secret for use in a later step.
4848
49+
## Configuring optional claims
50+
51+
If you want to get the `family_name` and `given_name` claims from Azure AD, you can configure optional claims for your application in the Azure portal UI or application manifest. For more information, see [How to provide optional claims to your Azure AD app](../active-directory/develop/active-directory-optional-claims.md).
52+
53+
1. Sign in to the [Azure portal](https://portal.azure.com). Search for and select **Azure Active Directory**.
54+
1. From the **Manage** section, select **App registrations**.
55+
1. Select the application you want to configure optional claims for in the list.
56+
1. From the **Manage** section, select **Token configuration (preview)**.
57+
1. Select **Add optional claim**.
58+
1. Select the token type you want to configure.
59+
1. Select the optional claims to add.
60+
1. Click **Add**.
61+
4962
## Create a policy key
5063
5164
You need to store the application key that you created in your Azure AD B2C tenant.
@@ -69,23 +82,20 @@ You can define Azure AD as a claims provider by adding Azure AD to the **ClaimsP
6982
1. Open the *TrustFrameworkExtensions.xml* file.
7083
2. Find the **ClaimsProviders** element. If it does not exist, add it under the root element.
7184
3. Add a new **ClaimsProvider** as follows:
72-
73-
```XML
85+
```xml
7486
<ClaimsProvider>
7587
<Domain>Contoso</Domain>
7688
<DisplayName>Login using Contoso</DisplayName>
7789
<TechnicalProfiles>
78-
<TechnicalProfile Id="ContosoProfile">
90+
<TechnicalProfile Id="OIDC-Contoso">
7991
<DisplayName>Contoso Employee</DisplayName>
8092
<Description>Login with your Contoso account</Description>
8193
<Protocol Name="OpenIdConnect"/>
8294
<Metadata>
83-
<Item Key="METADATA">https://login.windows.net/your-AD-tenant-name.onmicrosoft.com/.well-known/openid-configuration</Item>
84-
<Item Key="ProviderName">https://sts.windows.net/00000000-0000-0000-0000-000000000000/</Item>
85-
<!-- Update the Client ID below to the Application ID -->
95+
<Item Key="METADATA">https://login.microsoftonline.com/tenant-name.onmicrosoft.com/v2.0/.well-known/openid-configuration</Item>
8696
<Item Key="client_id">00000000-0000-0000-0000-000000000000</Item>
8797
<Item Key="response_types">code</Item>
88-
<Item Key="scope">openid</Item>
98+
<Item Key="scope">openid profile</Item>
8999
<Item Key="response_mode">form_post</Item>
90100
<Item Key="HttpBinding">POST</Item>
91101
<Item Key="UsePolicyInRedirectUri">false</Item>
@@ -121,12 +131,11 @@ You can define Azure AD as a claims provider by adding Azure AD to the **ClaimsP
121131
122132
To get a token from the Azure AD endpoint, you need to define the protocols that Azure AD B2C should use to communicate with Azure AD. This is done inside the **TechnicalProfile** element of **ClaimsProvider**.
123133
124-
1. Update the ID of the **TechnicalProfile** element. This ID is used to refer to this technical profile from other parts of the policy.
134+
1. Update the ID of the **TechnicalProfile** element. This ID is used to refer to this technical profile from other parts of the policy, for example `OIDC-Contoso`.
125135
1. Update the value for **DisplayName**. This value will be displayed on the sign-in button on your sign-in screen.
126136
1. Update the value for **Description**.
127137
1. Azure AD uses the OpenID Connect protocol, so make sure that the value for **Protocol** is `OpenIdConnect`.
128-
1. Set value of the **METADATA** to `https://login.windows.net/your-AD-tenant-name.onmicrosoft.com/.well-known/openid-configuration`, where `your-AD-tenant-name` is your Azure AD tenant name. For example, `https://login.windows.net/fabrikam.onmicrosoft.com/.well-known/openid-configuration`
129-
1. Open your browser and go to the **METADATA** URL that you just updated, look for the **issuer** object, and then copy and paste the value into the value for **ProviderName** in the XML file.
138+
1. Set value of the **METADATA** to `https://login.microsoftonline.com/tenant-name.onmicrosoft.com/v2.0/.well-known/openid-configuration`, where `tenant-name` is your Azure AD tenant name. For example, `https://login.microsoftonline.com/contoso.onmicrosoft.com/v2.0/.well-known/openid-configuration`
130139
1. Set **client_id** to the application ID from the application registration.
131140
1. Under **CryptographicKeys**, update the value of **StorageReferenceId** to the name of the policy key that you created earlier. For example, `B2C_1A_ContosoAppSecret`.
132141
@@ -167,10 +176,10 @@ Now that you have a button in place, you need to link it to an action. The actio
167176
1. Add the following **ClaimsExchange** element making sure that you use the same value for **Id** that you used for **TargetClaimsExchangeId**:
168177
169178
```XML
170-
<ClaimsExchange Id="ContosoExchange" TechnicalProfileReferenceId="ContosoProfile" />
179+
<ClaimsExchange Id="ContosoExchange" TechnicalProfileReferenceId="OIDC-Contoso" />
171180
```
172181
173-
Update the value of **TechnicalProfileReferenceId** to the **Id** of the technical profile you created earlier. For example, `ContosoProfile`.
182+
Update the value of **TechnicalProfileReferenceId** to the **Id** of the technical profile you created earlier. For example, `OIDC-Contoso`.
174183
175184
1. Save the *TrustFrameworkExtensions.xml* file and upload it again for verification.
176185

0 commit comments

Comments
 (0)