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: 1-WebApp-OIDC/1-1-MyOrg/AppCreationScripts/AppCreationScripts.md
+9-9
Original file line number
Diff line number
Diff line change
@@ -9,7 +9,7 @@
9
9
```PowerShell
10
10
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope Process -Force
11
11
```
12
-
1. Run the script to create your Azure AD application and configure the code of the sample application accordingly. (Other ways of running the scripts are described below)
12
+
1. Run the script to create your Microsoft Entra application and configure the code of the sample application accordingly. (Other ways of running the scripts are described below)
13
13
```PowerShell
14
14
cd .\AppCreationScripts\
15
15
.\Configure.ps1
@@ -32,23 +32,23 @@ The following paragraphs:
32
32
33
33
### Presentation of the scripts
34
34
35
-
This sample comes with two PowerShell scripts, which automate the creation of the Azure Active Directory applications, and the configuration of the code for this sample. Once you run them, you will only need to build the solution and you are good to test.
35
+
This sample comes with two PowerShell scripts, which automate the creation of the Microsoft Entra applications, and the configuration of the code for this sample. Once you run them, you will only need to build the solution and you are good to test.
36
36
37
37
These scripts are:
38
38
39
39
-`Configure.ps1` which:
40
-
- creates Azure AD applications and their related objects (permissions, dependencies, secrets),
40
+
- creates Microsoft Entra applications and their related objects (permissions, dependencies, secrets),
41
41
- changes the configuration files in the C# and JavaScript projects.
42
-
- creates a summary file named `createdApps.html` in the folder from which you ran the script, and containing, for each Azure AD application it created:
42
+
- creates a summary file named `createdApps.html` in the folder from which you ran the script, and containing, for each Microsoft Entra application it created:
43
43
- the identifier of the application
44
44
- the AppId of the application
45
-
- the url of its registration in the [Azure portal](https://portal.azure.com).
45
+
- the url of its registration in the [Microsoft Entra admin center](https://portal.azure.com).
46
46
47
-
-`Cleanup.ps1` which cleans-up the Azure AD objects created by `Configure.ps1`. Note that this script does not revert the changes done in the configuration files, though. You will need to undo the change from source control (from Visual Studio, or from the command line using, for instance, git reset).
47
+
-`Cleanup.ps1` which cleans-up the Microsoft Entra objects created by `Configure.ps1`. Note that this script does not revert the changes done in the configuration files, though. You will need to undo the change from source control (from Visual Studio, or from the command line using, for instance, git reset).
48
48
49
49
### Usage pattern for tests and DevOps scenarios
50
50
51
-
The `Configure.ps1` will stop if it tries to create an Azure AD application which already exists in the tenant. For this, if you are using the script to try/test the sample, or in DevOps scenarios, you might want to run `Cleanup.ps1` just before `Configure.ps1`. This is what is shown in the steps below.
51
+
The `Configure.ps1` will stop if it tries to create a Microsoft Entra application which already exists in the tenant. For this, if you are using the script to try/test the sample, or in DevOps scenarios, you might want to run `Cleanup.ps1` just before `Configure.ps1`. This is what is shown in the steps below.
52
52
53
53
## How to use the app creation scripts ?
54
54
@@ -122,8 +122,8 @@ Of course, in real life, you might already get the password as a `SecureString`.
122
122
#### Option 3 (Interactive, but create apps in a specified tenant)
123
123
124
124
if you want to create the apps in a particular tenant, you can use the following option:
125
-
- open the [Azure portal](https://portal.azure.com)
126
-
- Select the Azure Active directory you are interested in (in the combo-box below your name on the top right of the browser window)
125
+
- open the [Microsoft Entra admin center](https://portal.azure.com)
126
+
- Select the Microsoft Entra ID you are interested in (in the combo-box below your name on the top right of the browser window)
127
127
- Find the "Active Directory" object in this tenant
128
128
- Go to **Properties** and copy the content of the **Directory Id** property
Copy file name to clipboardExpand all lines: 1-WebApp-OIDC/1-1-MyOrg/README.md
+15-15
Original file line number
Diff line number
Diff line change
@@ -9,30 +9,30 @@ endpoint: Microsoft identity platform
9
9
10
10
# An ASP.NET Core Web app signing-in users with the Microsoft identity platform in your organization
11
11
12
-
> This sample is for Azure AD, not Azure AD B2C. See [sample 1-5-B2C](https://github.com/Azure-Samples/active-directory-aspnetcore-webapp-openidconnect-v2/tree/master/1-WebApp-OIDC/1-5-B2C), for B2C scenario.
12
+
> This sample is for Microsoft Entra ID, not Azure Active Directory B2C. See [sample 1-5-B2C](https://github.com/Azure-Samples/active-directory-aspnetcore-webapp-openidconnect-v2/tree/master/1-WebApp-OIDC/1-5-B2C), for B2C scenario.
This sample shows how to build a .NET Core MVC Web app that uses OpenID Connect to sign in users. Users can only sign-in with their `work and school` accounts in their own organization. It leverages the ASP.NET Core OpenID Connect middleware.
19
19
20
-

20
+

21
21
22
22
> This is the first chapter of this ASP.NET Core Web App tutorial. Once you understand how to sign-in users in an ASP.NET Core Web App with Open Id Connect, you can learn how to enable your [Web App to call a Web API on behalf of the signed-in user](../../2-WebApp-graph-user) in a later chapter.
23
-
You can also sign-in users in any or several Azure Active Directory organizations, and even with Microsoft personal accounts or social identities. For more details the parent directory's [Readme.md](../Readme.md)
23
+
You can also sign-in users in any or several Microsoft Entra tenants, and even with Microsoft personal accounts or social identities. For more details the parent directory's [Readme.md](../Readme.md)
24
24
25
25
## How to run this sample
26
26
27
27
To run this sample:
28
28
29
29
> Pre-requisites: Install .NET Core 3.0 or later (for example for Windows) by following the instructions at [.NET and C# - Get Started in 10 Minutes](https://www.microsoft.com/net/core). In addition to developing on Windows, you can develop on [Linux](https://www.microsoft.com/net/core#linuxredhat), [Mac](https://www.microsoft.com/net/core#macos), or [Docker](https://www.microsoft.com/net/core#dockercmd).
30
30
31
-
### Step 1: Register the sample with your Azure AD tenant
31
+
### Step 1: Register the sample with your Microsoft Entra tenant
32
32
33
33
There is one project in this sample. To register it, you can:
34
34
35
-
- either use PowerShell scripts that **automatically** creates the Azure AD applications and related objects (passwords, permissions, dependencies) for you and modify the Visual Studio projects' configuration files.
35
+
- either use PowerShell scripts that **automatically** creates the Microsoft Entra applications and related objects (passwords, permissions, dependencies) for you and modify the Visual Studio projects' configuration files.
36
36
37
37
<details>
38
38
<summary>Expand to see how to use this automation</summary>
@@ -45,7 +45,7 @@ There is one project in this sample. To register it, you can:
45
45
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope Process -Force
46
46
```
47
47
48
-
3. Run the script to create your Azure AD application and configure the code of the sample application accordingly
48
+
3. Run the script to create your Microsoft Entra application and configure the code of the sample application accordingly
49
49
50
50
```PowerShell
51
51
cd .\AppCreationScripts\
@@ -58,15 +58,15 @@ There is one project in this sample. To register it, you can:
58
58
59
59
</details>
60
60
61
-
- or, if you want to register your application with the Azure portal, follow the steps below:
61
+
- or, if you want to register your application with the Microsoft Entra admin center, follow the steps below:
62
62
63
-
#### Choose the Azure AD tenant where you want to create your applications
63
+
#### Choose the Microsoft Entra tenant where you want to create your applications
64
64
65
65
As a first step you'll need to:
66
66
67
-
1. Sign in to the [Azure portal](https://portal.azure.com) using either a work or school account or a personal Microsoft account.
68
-
1. If your account is present in more than one Azure AD tenant, select your profile at the top right corner in the menu on top of the page, and then **switch directory**.
69
-
Change your portal session to the desired Azure AD tenant.
67
+
1. Sign in to the [Microsoft Entra admin center](https://portal.azure.com) using either a work or school account or a personal Microsoft account.
68
+
1. If your account is present in more than one Microsoft Entra tenant, select your profile at the top right corner in the menu on top of the page, and then **switch directory**.
69
+
Change your portal session to the desired Microsoft Entra tenant.
70
70
71
71
#### Register the webApp app (WebApp)
72
72
@@ -131,7 +131,7 @@ cd "1-WebApp-OIDC\1-1-MyOrg"
131
131
132
132
- replace the `ClientID` value with the *Application ID* from the application you registered in Application Registration portal on *Step 1*.
133
133
- replace the `TenantId` value with the *Tenant ID* where you registered your Application on *Step 1*.
134
-
- replace the `Domain` value with the *Azure AD domain name*, e.g. contoso.onmicrosoft.com where you registered your Application on *Step 1*.
134
+
- replace the `Domain` value with the *Microsoft Entra domain name*, e.g. contoso.onmicrosoft.com where you registered your Application on *Step 1*.
135
135
136
136
#### Option 2: Create the sample from the command line
137
137
@@ -189,9 +189,9 @@ If your web site needs to be accessed from users using iOS 12, you probably want
189
189
190
190
## About The code
191
191
192
-
This sample shows how to use the OpenID Connect ASP.NET Core middleware to sign in users from a single Azure AD tenant. The middleware is initialized in the `Startup.cs` file by passing it the Client ID of the app, and the URL of the Azure AD tenant where the app is registered. These values are read from the `appsettings.json` file. The middleware takes care of:
192
+
This sample shows how to use the OpenID Connect ASP.NET Core middleware to sign in users from a single Microsoft Entra tenant. The middleware is initialized in the `Startup.cs` file by passing it the Client ID of the app, and the URL of the Microsoft Entra tenant where the app is registered. These values are read from the `appsettings.json` file. The middleware takes care of:
193
193
194
-
- Downloading the Azure AD metadata, finding the signing keys, and finding the issuer name for the tenant.
194
+
- Downloading the Microsoft Entra ID metadata, finding the signing keys, and finding the issuer name for the tenant.
195
195
- Processing OpenID Connect sign-in responses by validating the signature and issuer in an incoming JWT, extracting the user's claims, and putting the claims in`ClaimsPrincipal.Current`.
196
196
- Integrating with the session cookie ASP.NET Core middleware to establish a session for the user.
Copy file name to clipboardExpand all lines: 1-WebApp-OIDC/1-2-AnyOrg/AppCreationScripts/AppCreationScripts.md
+9-9
Original file line number
Diff line number
Diff line change
@@ -9,7 +9,7 @@
9
9
```PowerShell
10
10
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope Process -Force
11
11
```
12
-
1. Run the script to create your Azure AD application and configure the code of the sample application accordingly. (Other ways of running the scripts are described below)
12
+
1. Run the script to create your Microsoft Entra application and configure the code of the sample application accordingly. (Other ways of running the scripts are described below)
13
13
```PowerShell
14
14
cd .\AppCreationScripts\
15
15
.\Configure.ps1
@@ -32,23 +32,23 @@ The following paragraphs:
32
32
33
33
### Presentation of the scripts
34
34
35
-
This sample comes with two PowerShell scripts, which automate the creation of the Azure Active Directory applications, and the configuration of the code for this sample. Once you run them, you will only need to build the solution and you are good to test.
35
+
This sample comes with two PowerShell scripts, which automate the creation of the Microsoft Entra applications, and the configuration of the code for this sample. Once you run them, you will only need to build the solution and you are good to test.
36
36
37
37
These scripts are:
38
38
39
39
-`Configure.ps1` which:
40
-
- creates Azure AD applications and their related objects (permissions, dependencies, secrets),
40
+
- creates Microsoft Entra applications and their related objects (permissions, dependencies, secrets),
41
41
- changes the configuration files in the C# and JavaScript projects.
42
-
- creates a summary file named `createdApps.html` in the folder from which you ran the script, and containing, for each Azure AD application it created:
42
+
- creates a summary file named `createdApps.html` in the folder from which you ran the script, and containing, for each Microsoft Entra application it created:
43
43
- the identifier of the application
44
44
- the AppId of the application
45
-
- the url of its registration in the [Azure portal](https://portal.azure.com).
45
+
- the url of its registration in the [Microsoft Entra admin center](https://portal.azure.com).
46
46
47
-
-`Cleanup.ps1` which cleans-up the Azure AD objects created by `Configure.ps1`. Note that this script does not revert the changes done in the configuration files, though. You will need to undo the change from source control (from Visual Studio, or from the command line using, for instance, git reset).
47
+
-`Cleanup.ps1` which cleans-up the Microsoft Entra objects created by `Configure.ps1`. Note that this script does not revert the changes done in the configuration files, though. You will need to undo the change from source control (from Visual Studio, or from the command line using, for instance, git reset).
48
48
49
49
### Usage pattern for tests and DevOps scenarios
50
50
51
-
The `Configure.ps1` will stop if it tries to create an Azure AD application which already exists in the tenant. For this, if you are using the script to try/test the sample, or in DevOps scenarios, you might want to run `Cleanup.ps1` just before `Configure.ps1`. This is what is shown in the steps below.
51
+
The `Configure.ps1` will stop if it tries to create a Microsoft Entra application which already exists in the tenant. For this, if you are using the script to try/test the sample, or in DevOps scenarios, you might want to run `Cleanup.ps1` just before `Configure.ps1`. This is what is shown in the steps below.
52
52
53
53
## How to use the app creation scripts ?
54
54
@@ -122,8 +122,8 @@ Of course, in real life, you might already get the password as a `SecureString`.
122
122
#### Option 3 (Interactive, but create apps in a specified tenant)
123
123
124
124
if you want to create the apps in a particular tenant, you can use the following option:
125
-
- open the [Azure portal](https://portal.azure.com)
126
-
- Select the Azure Active directory you are interested in (in the combo-box below your name on the top right of the browser window)
125
+
- open the [Microsoft Entra admin center](https://portal.azure.com)
126
+
- Select the Microsoft Entra ID you are interested in (in the combo-box below your name on the top right of the browser window)
127
127
- Find the "Active Directory" object in this tenant
128
128
- Go to **Properties** and copy the content of the **Directory Id** property
0 commit comments