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
Copy file name to clipboardExpand all lines: 13/umbraco-cms/tutorials/add-microsoft-entra-id-authentication.md
+14-6Lines changed: 14 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -34,7 +34,7 @@ Add a new client secret. Be sure to copy the "Value" generated, since you will n
34
34
35
35
Back on the "Overview" screen, click on the "Add a Redirect URI" link.
36
36
37
-
Add full urls for all of your applicable environments (local, dev, live, etc.) with the path `/umbraco-b2c-members-signin` added (ex: https://MYSITE.COM/umbraco-b2c-members-signin).
37
+
Add full urls for all of your applicable environments (local, dev, live, etc.) with the path `/umbraco-b2c-members-signin` added (ex: https://mysite.com/umbraco-b2c-members-signin).
38
38
39
39
## Step 2: Install the NuGet package
40
40
@@ -71,9 +71,11 @@ public class EntraIDB2CMembersExternalLoginProviderOptions : IConfigureNamedOpti
@@ -123,7 +125,9 @@ public class EntraIDB2CMembersExternalLoginProviderOptions : IConfigureNamedOpti
123
125
{% endcode %}
124
126
125
127
{% hint style="info" %}
128
+
126
129
Using "autolinking", if a site visitor attempts to "Sign in with Microsoft" and there is a member in the system with a matching email address, the login will sign in that member. If there is no matching Member, a new one will be created, but by default won't be assigned to any groups.
130
+
127
131
{% endhint %}
128
132
129
133
2. Create a new static extension class called `MemberAuthenticationExtensions.cs`.
@@ -178,11 +182,15 @@ public static class MemberAuthenticationExtensions
178
182
{% endcode %}
179
183
180
184
{% hint style="info" %}
185
+
181
186
Ensure to replace `YOURCLIENTID` and `YOURCLIENTSECRET` in the code with the values from the Entra ID tenant. If Entra ID is configured to use accounts in the organizational directory only (single tenant registration), you must specify the Token and Authorization endpoint. For more information on the differences between single and multi tenant registration, refer to [Microsoft's identity platform documentation](https://learn.microsoft.com/en-us/entra/identity-platform/howto-modify-supported-accounts).
187
+
182
188
{% endhint %}
183
189
184
190
{% hint style="info" %}
191
+
185
192
The Client Secret value will expire at some point and need to be regenerated in the Entra admin center, so you might want to use configurable secret storage to provide the value to your code, rather than hard-coding it.
193
+
186
194
{% endhint %}
187
195
188
196
4. Add the Members authentication configuration in the `Program.cs` file:
0 commit comments