Skip to content

Commit bcc8b47

Browse files
committed
Formatting fixes
1 parent e8b49f0 commit bcc8b47

File tree

1 file changed

+14
-6
lines changed

1 file changed

+14
-6
lines changed

13/umbraco-cms/tutorials/add-microsoft-entra-id-authentication.md

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ Add a new client secret. Be sure to copy the "Value" generated, since you will n
3434

3535
Back on the "Overview" screen, click on the "Add a Redirect URI" link.
3636

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).
3838

3939
## Step 2: Install the NuGet package
4040

@@ -71,9 +71,11 @@ public class EntraIDB2CMembersExternalLoginProviderOptions : IConfigureNamedOpti
7171

7272
public void Configure(MemberExternalLoginProviderOptions options)
7373
{
74-
// The following options are relevant if you
75-
// want to configure auto-linking on the authentication.
76-
options.AutoLinkOptions = new MemberExternalSignInAutoLinkOptions(
74+
75+
// The following options are relevant if you
76+
// want to configure auto-linking on the authentication.
77+
78+
options.AutoLinkOptions = new MemberExternalSignInAutoLinkOptions(
7779

7880
// Set to true to enable auto-linking
7981
autoLinkExternalAccount: true,
@@ -123,7 +125,9 @@ public class EntraIDB2CMembersExternalLoginProviderOptions : IConfigureNamedOpti
123125
{% endcode %}
124126

125127
{% hint style="info" %}
128+
126129
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+
127131
{% endhint %}
128132

129133
2. Create a new static extension class called `MemberAuthenticationExtensions.cs`.
@@ -178,11 +182,15 @@ public static class MemberAuthenticationExtensions
178182
{% endcode %}
179183

180184
{% hint style="info" %}
185+
181186
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+
182188
{% endhint %}
183189

184190
{% hint style="info" %}
191+
185192
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+
186194
{% endhint %}
187195

188196
4. Add the Members authentication configuration in the `Program.cs` file:
@@ -203,16 +211,16 @@ builder.CreateUmbracoBuilder()
203211
{% endcode %}
204212

205213
{% hint style="info" %}
214+
206215
Are you building a package for Umbraco?
207216

208217
Then you will not have access to the `Program.cs` file. Instead you need to create a composer in order to register your extension method.
209218

210219
Learn more about this in the [Dependency Injection](../reference/using-ioc.md) article.
220+
211221
{% endhint %}
212222

213223
5. Build the project.
214224
6. Run the website.
215225

216226
![Entra ID Login Screen](<../../../10/umbraco-cms/reference/security/images/AD\_Login\_Members (1).png>)
217-
218-

0 commit comments

Comments
 (0)