You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To enable sign-in for users with a LinkedIn account in Azure Active Directory B2C (Azure AD B2C), you need to create an application in [LinkedIn Developers website](https://developer.linkedin.com/). For more information, see [Authorization Code Flow](/linkedin/shared/authentication/authorization-code-flow). If you don't already have a LinkedIn account, you can sign up at [https://www.linkedin.com/](https://www.linkedin.com/).
34
+
To enable sign-in for users with a LinkedIn account in Azure Active Directory B2C (Azure AD B2C), you need to create an application in [LinkedIn Developers website](https://developer.linkedin.com/). If you don't already have a LinkedIn account, you can sign up at [https://www.linkedin.com/](https://www.linkedin.com/).
35
35
36
36
1. Sign in to the [LinkedIn Developers website](https://developer.linkedin.com/) with your LinkedIn account credentials.
37
37
1. Select **My Apps**, and then click **Create app**.
38
38
1. Enter **App name**, **LinkedIn Page**, **Privacy policy URL**, and **App logo**.
39
39
1. Agree to the LinkedIn **API Terms of Use** and click **Create app**.
40
40
1. Select the **Auth** tab. Under **Authentication Keys**, copy the values for **Client ID** and **Client Secret**. You'll need both of them to configure LinkedIn as an identity provider in your tenant. **Client Secret** is an important security credential.
41
41
1. Select the edit pencil next to **Authorized redirect URLs for your app**, and then select **Add redirect URL**. Enter `https://your-tenant-name.b2clogin.com/your-tenant-name.onmicrosoft.com/oauth2/authresp`. If you use a [custom domain](custom-domain.md), enter `https://your-domain-name/your-tenant-name.onmicrosoft.com/oauth2/authresp`. Replace `your-tenant-name` with the name of your tenant, and `your-domain-name` with your custom domain. You need to use all lowercase letters when entering your tenant name even if the tenant is defined with uppercase letters in Azure AD B2C. Select **Update**.
42
-
1. By default, your LinkedIn app isn't approved for scopes related to sign in. To request a review, select the **Products** tab, and then select **Sign In with LinkedIn**. When the review is complete, the required scopes will be added to your application.
42
+
1. By default, your LinkedIn app isn't approved for scopes related to sign in. To request a review, select the **Products** tab, and then select **Sign In with LinkedIn using OpenID Connect**. When the review is complete, the required scopes will be added to your application.
43
43
> [!NOTE]
44
44
> You can view the scopes that are currently allowed for your app on the **Auth** tab in the **OAuth 2.0 scopes** section.
45
45
@@ -49,11 +49,20 @@ To enable sign-in for users with a LinkedIn account in Azure Active Directory B2
49
49
50
50
1. Sign in to the [Azure portal](https://portal.azure.com/) as the global administrator of your Azure AD B2C tenant.
51
51
1. If you have access to multiple tenants, select the **Settings** icon in the top menu to switch to your Azure AD B2C tenant from the **Directories + subscriptions** menu.
52
+
1. On the **Portal settings | Directories + subscriptions** page, find your Azure AD B2C directory in the **Directory name** list, and then select **Switch**.
52
53
1. Choose **All services** in the top-left corner of the Azure portal, search for and select **Azure AD B2C**.
53
-
1. Select **Identity providers**, then select **LinkedIn**.
54
-
1. Enter a **Name**. For example, *LinkedIn*.
54
+
1. Select **Identity providers**, then select **New OpenID Connect provider**.
55
+
1. Enter a **Name**. For example, *LinkedIn-OIDC*.
56
+
1. For the **Metadata URL**, enter **https://www.linkedin.com/oauth/.well-known/openid-configuration**.
55
57
1. For the **Client ID**, enter the Client ID of the LinkedIn application that you created earlier.
56
58
1. For the **Client secret**, enter the Client Secret that you recorded.
59
+
1. For the **Scope**, enter **openid profile email**.
60
+
1. For the **Response type**, enter **code**.
61
+
1. For the **User ID**, enter **email**.
62
+
1. For the **Display name**, enter **name**.
63
+
1. For the **Given name**, enter **given_name**.
64
+
1. For the **Surname**, enter **family_name**.
65
+
1. For the **Email**, enter **email**.
57
66
1. Select **Save**.
58
67
59
68
## Add LinkedIn identity provider to a user flow
@@ -62,12 +71,12 @@ At this point, the LinkedIn identity provider has been set up, but it's not yet
62
71
63
72
1. In your Azure AD B2C tenant, select **User flows**.
64
73
1. Click the user flow that you want to add the LinkedIn identity provider.
65
-
1. Under the **Social identity providers**, select **LinkedIn**.
74
+
1. Under the **Custom identity providers**, select **LinkedIn-OIDC**.
66
75
1. Select **Save**.
67
76
1. To test your policy, select **Run user flow**.
68
77
1. For **Application**, select the web application named *testapp1* that you previously registered. The **Reply URL** should show `https://jwt.ms`.
69
78
1. Select the **Run user flow** button.
70
-
1. From the sign-up or sign-in page, select **LinkedIn** to sign in with LinkedIn account.
79
+
1. From the sign-up or sign-in page, select **LinkedIn-OIDC** to sign in with LinkedIn account.
71
80
72
81
If the sign-in process is successful, your browser is redirected to `https://jwt.ms`, which displays the contents of the token returned by Azure AD B2C.
73
82
@@ -81,6 +90,7 @@ You need to store the client secret that you previously recorded in your Azure A
81
90
82
91
1. Sign in to the [Azure portal](https://portal.azure.com/).
83
92
1. If you have access to multiple tenants, select the **Settings** icon in the top menu to switch to your Azure AD B2C tenant from the **Directories + subscriptions** menu.
93
+
1. On the **Portal settings | Directories + subscriptions** page, find your Azure AD B2C directory in the **Directory name** list, and then select **Switch**.
84
94
1. Choose **All services** in the top-left corner of the Azure portal, and then search for and select **Azure AD B2C**.
85
95
1. On the Overview page, select **Identity Experience Framework**.
86
96
1. Select **Policy keys** and then select **Add**.
@@ -103,94 +113,45 @@ Define a LinkedIn account as a claims provider by adding it to the **ClaimsProvi
1. Replace the value of **client_id** with the client ID of the LinkedIn application that you previously recorded.
150
153
1. Save the file.
151
154
152
-
### Add the claims transformations
153
-
154
-
The LinkedIn technical profile requires the **ExtractGivenNameFromLinkedInResponse** and **ExtractSurNameFromLinkedInResponse** claims transformations to be added to the list of ClaimsTransformations. If you don't have a **ClaimsTransformations** element defined in your file, add the parent XML elements as shown below. The claims transformations also need a new claim type defined named **nullStringClaim**.
155
-
156
-
Add the **BuildingBlocks** element near the top of the *TrustFrameworkExtensions.xml* file. See *TrustFrameworkBase.xml* for an example.
157
-
158
-
```xml
159
-
<BuildingBlocks>
160
-
<ClaimsSchema>
161
-
<!-- Claim type needed for LinkedIn claims transformations -->
162
-
<ClaimTypeId="nullStringClaim">
163
-
<DisplayName>nullClaim</DisplayName>
164
-
<DataType>string</DataType>
165
-
<AdminHelpText>A policy claim to store output values from ClaimsTransformations that aren't useful. This claim should not be used in TechnicalProfiles.</AdminHelpText>
166
-
<UserHelpText>A policy claim to store output values from ClaimsTransformations that aren't useful. This claim should not be used in TechnicalProfiles.</UserHelpText>
167
-
</ClaimType>
168
-
</ClaimsSchema>
169
-
170
-
<ClaimsTransformations>
171
-
<!-- Claim transformations needed for LinkedIn technical profile -->
@@ -218,7 +179,7 @@ Add the **BuildingBlocks** element near the top of the *TrustFrameworkExtensions
218
179
1. Select your relying party policy, for example `B2C_1A_signup_signin`.
219
180
1. For **Application**, select a web application that you [previously registered](tutorial-register-applications.md). The **Reply URL** should show `https://jwt.ms`.
220
181
1. Select the **Run now** button.
221
-
1. From the sign-up or sign-in page, select **LinkedIn** to sign in with LinkedIn account.
182
+
1. From the sign-up or sign-in page, select **LinkedIn-OIDC** to sign in with LinkedIn account.
222
183
223
184
If the sign-in process is successful, your browser is redirected to `https://jwt.ms`, which displays the contents of the token returned by Azure AD B2C.
0 commit comments