Skip to content

Commit 0646cce

Browse files
Merge pull request #278329 from craigshoemaker/swa/entra
[Static Web Apps] Update: Active Directory to Entra rebranding
2 parents 60ea90e + ba057f0 commit 0646cce

File tree

2 files changed

+20
-20
lines changed

2 files changed

+20
-20
lines changed

articles/static-web-apps/assign-roles-microsoft-graph.md

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,30 @@
11
---
22
title: "Tutorial: Assign Azure Static Web Apps roles with Microsoft Graph"
3-
description: Learn to use a serverless function to assign custom user roles based on Active Directory group membership.
3+
description: Learn to use a serverless function to assign custom user roles based on Entra ID group membership.
44
services: static-web-apps
55
author: craigshoemaker
66
ms.service: static-web-apps
77
ms.topic: tutorial
8-
ms.date: 07/11/2023
8+
ms.date: 06/13/2024
99
ms.author: cshoe
1010
keywords: "static web apps authorization, assign user roles, custom roles"
1111
---
1212

1313
# Tutorial: Assign custom roles with a function and Microsoft Graph
1414

15-
This article demonstrates how to use a function to query [Microsoft Graph](https://developer.microsoft.com/graph) and assign custom roles to a user based on their Active Directory group membership.
15+
This article demonstrates how to use a function to query [Microsoft Graph](https://developer.microsoft.com/graph) and assign custom roles to a user based on their Entra ID group membership.
1616

1717
In this tutorial, you learn to:
1818

1919
- Deploy a static web app.
2020
- Create a Microsoft Entra app registration.
2121
- Set up custom authentication with Microsoft Entra ID.
22-
- Configure a [serverless function](authentication-custom.md#manage-roles) that queries the user's Active Directory group membership and returns a list of custom roles.
22+
- Configure a [serverless function](authentication-custom.md#manage-roles) that queries the user's Entra ID group membership and returns a list of custom roles.
2323

2424
> [!NOTE]
2525
> This tutorial requires you to [use a function to assign roles](authentication-custom.md#manage-roles). Function-based role management is currently in preview. The permission level required to complete this tutorial is "User.Read.All".
2626
27-
There's a function named *GetRoles* in the app's API. This function uses the user's access token to query Active Directory from Microsoft Graph. If the user is a member of any groups defined in the app, then the corresponding custom roles are mapped to the user.
27+
There's a function named *GetRoles* in the app's API. This function uses the user's access token to query Entra ID from Microsoft Graph. If the user is a member of any groups defined in the app, then the corresponding custom roles are mapped to the user.
2828

2929
## Prerequisites
3030

@@ -89,7 +89,7 @@ There's a function named *GetRoles* in the app's API. This function uses the use
8989

9090
1. Once the process is complete, select **Go to resource** to open your new static web app.
9191

92-
1. In the overview section, locate your application's **URL**. Copy this value into a text editor to use in upcoming steps to set up Active Directory authentication.
92+
1. In the overview section, locate your application's **URL**. Copy this value into a text editor to use in upcoming steps to set up Entra authentication.
9393

9494
<a name='create-an-azure-active-directory-application'></a>
9595

@@ -113,7 +113,7 @@ There's a function named *GetRoles* in the app's API. This function uses the use
113113

114114
1. After the app registration is created, copy the **Application (client) ID** and **Directory (tenant) ID** in the *Essentials* section to a text editor.
115115

116-
You need these values to configure Active Directory authentication in your static web app.
116+
You need these values to configure Entra ID authentication in your static web app.
117117

118118
### Enable ID tokens
119119

@@ -142,11 +142,11 @@ There's a function named *GetRoles* in the app's API. This function uses the use
142142

143143
1. Copy the **Value** of the client secret you created to a text editor.
144144

145-
You need this value to configure Active Directory authentication in your static web app.
145+
You need this value to configure Entra ID authentication in your static web app.
146146

147147
:::image type="content" source="media/assign-roles-microsoft-graph/create-client-secret.png" alt-text="Create a client secret":::
148148

149-
## Configure Active Directory authentication
149+
## Configure Entra ID authentication
150150

151151
1. In a browser, open the GitHub repository containing the static web app you deployed.
152152

@@ -159,9 +159,9 @@ There's a function named *GetRoles* in the app's API. This function uses the use
159159
"azureActiveDirectory": {
160160
"userDetailsClaim": "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name",
161161
"registration": {
162-
"openIdIssuer": "https://login.microsoftonline.com/<YOUR_AAD_TENANT_ID>",
163-
"clientIdSettingName": "AAD_CLIENT_ID",
164-
"clientSecretSettingName": "AAD_CLIENT_SECRET"
162+
"openIdIssuer": "https://login.microsoftonline.com/<YOUR_ENTRA_TENANT_ID>",
163+
"clientIdSettingName": "ENTRA_CLIENT_ID",
164+
"clientSecretSettingName": "ENTRA_CLIENT_SECRET"
165165
},
166166
"login": {
167167
"loginParameters": [
@@ -186,7 +186,7 @@ There's a function named *GetRoles* in the app's API. This function uses the use
186186

187187
1. Select **Edit** to update the file.
188188

189-
1. Update the *openIdIssuer* value of `https://login.microsoftonline.com/<YOUR_AAD_TENANT_ID>` by replacing `<YOUR_AAD_TENANT_ID>` with the directory (tenant) ID of your Microsoft Entra ID.
189+
1. Update the *openIdIssuer* value of `https://login.microsoftonline.com/<YOUR_ENTRA_TENANT_ID>` by replacing `<YOUR_ENTRA_TENANT_ID>` with the directory (tenant) ID of your Microsoft Entra ID.
190190

191191
1. Select **Commit changes...**.
192192

@@ -202,14 +202,14 @@ There's a function named *GetRoles* in the app's API. This function uses the use
202202

203203
| Name | Value |
204204
|---|---|
205-
| `AAD_CLIENT_ID` | Your Active Directory application (client) ID. |
206-
| `AAD_CLIENT_SECRET` | Your Active Directory application client secret value. |
205+
| `ENTRA_CLIENT_ID` | Your Entra ID application (client) ID. |
206+
| `ENTRA_CLIENT_SECRET` | Your Entra application client secret value. |
207207

208208
1. Select **Save**.
209209

210210
## Create roles
211211

212-
1. Open you Active Directory app registration in the Azure portal.
212+
1. Open you Entra ID app registration in the Azure portal.
213213

214214
1. Under *Manage*, select **App roles**.
215215

@@ -253,9 +253,9 @@ Based on the user's group memberships, the function assigns custom roles to the
253253
};
254254
```
255255

256-
The *GetRoles* function is called whenever a user is successfully authenticated with Microsoft Entra ID. The function uses the user's access token to query their Active Directory group membership from Microsoft Graph. If the user is a member of any groups defined in the `roleGroupMappings` object, then the corresponding custom roles are returned.
256+
The *GetRoles* function is called whenever a user is successfully authenticated with Microsoft Entra ID. The function uses the user's access token to query their Entra group membership from Microsoft Graph. If the user is a member of any groups defined in the `roleGroupMappings` object, then the corresponding custom roles are returned.
257257

258-
In the above example, if a user is a member of the Active Directory group with ID `b6059db5-9cef-4b27-9434-bb793aa31805`, they're granted the `reader` role.
258+
In the above example, if a user is a member of the Entra ID group with ID `b6059db5-9cef-4b27-9434-bb793aa31805`, they're granted the `reader` role.
259259

260260
1. Select **Commit changes...**.
261261

@@ -267,7 +267,7 @@ Based on the user's group memberships, the function assigns custom roles to the
267267

268268
1. Sign in to your static web app using Microsoft Entra ID.
269269

270-
1. When you're logged in, the sample app displays the list of roles that you're assigned based on your identity's Active Directory group membership.
270+
1. When you're logged in, the sample app displays the list of roles that you're assigned based on your identity's Entra ID group membership.
271271

272272
Depending on these roles, you're permitted or prohibited to access some of the routes in the app.
273273

articles/static-web-apps/database-azure-sql.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ Create a sample table and seed it with sample data to match the tutorial.
7575

7676
1. On the left-hand navigation window, select **Query editor**.
7777

78-
1. Sign in to the server with your Active Directory account or the server's user name and password.
78+
1. Sign in to the server with your Entra ID account or the server's user name and password.
7979

8080
1. Run the following script to create a new table named `MyTestPersonTable`.
8181

0 commit comments

Comments
 (0)