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
{{ message }}
This repository was archived by the owner on May 3, 2024. It is now read-only.
Copy file name to clipboardExpand all lines: 1-Authentication/1-sign-in/AppCreationScripts/AppCreationScripts.md
+9-9
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@
4
4
5
5
### Quick summary
6
6
7
-
1. Run the script to create your Azure AD application and configure the code of the sample application accordingly.
7
+
1. Run the script to create your Microsoft Entra application and configure the code of the sample application accordingly.
8
8
9
9
```PowerShell
10
10
cd .\AppCreationScripts\
@@ -28,25 +28,25 @@
28
28
29
29
### Presentation of the scripts
30
30
31
-
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.
31
+
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.
32
32
33
33
These scripts are:
34
34
35
35
-`Configure.ps1` which:
36
-
- creates Azure AD applications and their related objects (permissions, dependencies, secrets, app roles),
36
+
- creates Microsoft Entra applications and their related objects (permissions, dependencies, secrets, app roles),
37
37
- changes the configuration files in the sample projects.
38
-
- 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:
38
+
- 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:
39
39
- the identifier of the application
40
40
- the AppId of the application
41
-
- the url of its registration in the [Azure portal](https://portal.azure.com).
41
+
- the url of its registration in the [Microsoft Entra admin center](https://entra.microsoft.com).
42
42
43
-
-`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`).
43
+
-`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`).
44
44
45
45
> :information_source: If the sample supports using certificates instead of client secrets, this folder will contain an additional set of scripts: `Configure-WithCertificates.ps1` and `Cleanup-WithCertificates.ps1`. You can use them in the same way to register app(s) that use certificates instead of client secrets.
46
46
47
47
### Usage pattern for tests and DevOps scenarios
48
48
49
-
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.
49
+
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.
50
50
51
51
## How to use the app creation scripts?
52
52
@@ -108,8 +108,8 @@ Note that the script will choose the tenant in which to create the applications,
108
108
109
109
if you want to create the apps in a particular tenant, you can use the following option:
110
110
111
-
- Open the [Azure portal](https://portal.azure.com)
112
-
- Select the Azure Active directory you are interested in (in the combo-box below your name on the top right of the browser window)
111
+
- Open the [Microsoft Entra admin center](https://entra.microsoft.com)
112
+
- Select the Microsoft Entra ID you are interested in (in the combo-box below your name on the top right of the browser window)
113
113
- Find the "Active Directory" object in this tenant
114
114
- Go to **Properties** and copy the content of the **Directory Id** property
# React single-page application using MSAL React to authenticate users against Azure Active Directory
20
+
# React single-page application using MSAL React to authenticate users against Microsoft Entra ID
21
21
22
22
*[Overview](#overview)
23
23
*[Scenario](#scenario)
@@ -33,16 +33,16 @@ extensions:
33
33
34
34
## Overview
35
35
36
-
This sample demonstrates a React single-page application (SPA) authenticating users against [Azure Active Directory](https://docs.microsoft.com/azure/active-directory/fundamentals/active-directory-whatis) (Azure AD), using the [Microsoft Authentication Library for React](https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/dev/lib/msal-react) (MSAL React).
36
+
This sample demonstrates a React single-page application (SPA) authenticating users against [Microsoft Entra ID](https://docs.microsoft.com/azure/active-directory/fundamentals/active-directory-whatis) (Microsoft Entra ID), using the [Microsoft Authentication Library for React](https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/dev/lib/msal-react) (MSAL React).
37
37
38
38
MSAL React is a wrapper around the [Microsoft Authentication Library for JavaScript](https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/dev/lib/msal-browser) (MSAL.js). As such, it exposes the same public APIs that MSAL.js offers, while adding many new features customized for modern React applications.
39
39
40
40
Here you'll learn how to [sign-in](https://docs.microsoft.com/azure/active-directory/develop/scenario-spa-sign-in) users and acquire [ID tokens](https://docs.microsoft.com/azure/active-directory/develop/id-tokens), as well as how to work with different [audiences and account types](https://docs.microsoft.com/azure/active-directory/develop/v2-supported-account-types).
41
41
42
42
## Scenario
43
43
44
-
1. The client React SPA uses the to sign-in a user and obtain a JWT [ID Token](https://aka.ms/id-tokens) from **Azure AD**.
45
-
1. The **ID Token** proves that the user has successfully authenticated against **Azure AD**.
44
+
1. The client React SPA uses the to sign-in a user and obtain a JWT [ID Token](https://aka.ms/id-tokens) from **Microsoft Entra ID**.
45
+
1. The **ID Token** proves that the user has successfully authenticated against **Microsoft Entra ID**.
46
46
47
47

48
48
@@ -60,10 +60,10 @@ Here you'll learn how to [sign-in](https://docs.microsoft.com/azure/active-direc
60
60
*[Visual Studio Code](https://code.visualstudio.com/download) is recommended for running and editing this sample.
61
61
*[VS Code Azure Tools](https://marketplace.visualstudio.com/items?itemName=ms-vscode.vscode-node-azure-pack) extension is recommended for interacting with Azure through VS Code Interface.
62
62
* A modern web browser.
63
-
* An **Azure AD** tenant. For more information, see: [How to get an Azure AD tenant](https://docs.microsoft.com/azure/active-directory/develop/test-setup-environment#get-a-test-tenant)
64
-
* A user account in your **Azure AD** tenant.
63
+
* An **Microsoft Entra ID** tenant. For more information, see: [How to get a Microsoft Entra tenant](https://docs.microsoft.com/azure/active-directory/develop/test-setup-environment#get-a-test-tenant)
64
+
* A user account in your **Microsoft Entra ID** tenant.
65
65
66
-
>This sample will not work with a **personal Microsoft account**. If you're signed in to the [Azure portal](https://portal.azure.com) with a personal Microsoft account and have not created a user account in your directory before, you will need to create one before proceeding.
66
+
>This sample will not work with a **personal Microsoft account**. If you're signed in to the [Microsoft Entra admin center](https://entra.microsoft.com) with a personal Microsoft account and have not created a user account in your directory before, you will need to create one before proceeding.
67
67
68
68
## Setup the sample
69
69
@@ -92,7 +92,7 @@ There is one project in this sample. To register it, you can:
92
92
93
93
* follow the steps below for manually register your apps
94
94
* or use PowerShell scripts that:
95
-
***automatically** creates the Azure AD applications and related objects (passwords, permissions, dependencies) for you.
95
+
***automatically** creates the Microsoft Entra applications and related objects (passwords, permissions, dependencies) for you.
96
96
* modify the projects' configuration files.
97
97
98
98
<details>
@@ -107,7 +107,7 @@ There is one project in this sample. To register it, you can:
107
107
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope Process -Force
108
108
```
109
109
110
-
1. Run the script to create your Azure AD application and configure the code of the sample application accordingly.
110
+
1. Run the script to create your Microsoft Entra application and configure the code of the sample application accordingly.
111
111
1. For interactive process -in PowerShell, run:
112
112
113
113
```PowerShell
@@ -119,16 +119,16 @@ There is one project in this sample. To register it, you can:
119
119
120
120
</details>
121
121
122
-
#### Choose the Azure AD tenant where you want to create your applications
122
+
#### Choose the Microsoft Entra tenant where you want to create your applications
123
123
124
124
To manually register the apps, as a first step you'll need to:
125
125
126
-
1. Sign in to the [Azure portal](https://portal.azure.com).
127
-
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** to change your portal session to the desired Azure AD tenant.
126
+
1. Sign in to the [Microsoft Entra admin center](https://entra.microsoft.com).
127
+
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** to change your portal session to the desired Microsoft Entra tenant.
128
128
129
129
#### Register the client app (msal-react-spa)
130
130
131
-
1. Navigate to the [Azure portal](https://portal.azure.com) and select the **Azure Active Directory** service.
131
+
1. Navigate to the [Microsoft Entra admin center](https://entra.microsoft.com) and select the **Microsoft Entra ID** service.
132
132
1. Select the **App Registrations** blade on the left, then select **New registration**.
133
133
1. In the **Register an application page** that appears, enter your application's registration information:
134
134
1. In the **Name** section, enter a meaningful application name that will be displayed to users of the app, for example `msal-react-spa`.
@@ -149,8 +149,8 @@ Open the project in your IDE (like Visual Studio or Visual Studio Code) to confi
149
149
> In the steps below, "ClientID" is the same as "Application ID" or "AppId".
150
150
151
151
1. Open the `SPA\src\authConfig.js` file.
152
-
1. Find the key `Enter_the_Application_Id_Here` and replace the existing value with the application ID (clientId) of `msal-react-spa` app copied from the Azure portal.
153
-
1. Find the key `Enter_the_Tenant_Id_Here` and replace the existing value with your Azure AD tenant/directory ID.
152
+
1. Find the key `Enter_the_Application_Id_Here` and replace the existing value with the application ID (clientId) of `msal-react-spa` app copied from the Microsoft Entra admin center.
153
+
1. Find the key `Enter_the_Tenant_Id_Here` and replace the existing value with your Microsoft Entra tenant/directory ID.
154
154
155
155
### Step 4: Running the sample
156
156
@@ -181,7 +181,7 @@ Were we successful in addressing your learning objective? Consider taking a mome
181
181
Ask your questions on Stack Overflow first and browse existing issues to see if someone has asked your question before.
182
182
Make sure that your questions or comments are tagged with [`azure-active-directory-b2c``node``ms-identity``adal``msal-js``msal`].
183
183
184
-
To provide feedback on or suggest features for Azure Active Directory, visit [User Voice page](https://feedback.azure.com/d365community/forum/79b1327d-d925-ec11-b6e6-000d3a4f06a4).
184
+
To provide feedback on or suggest features for Microsoft Entra ID, visit [User Voice page](https://feedback.azure.com/d365community/forum/79b1327d-d925-ec11-b6e6-000d3a4f06a4).
185
185
</details>
186
186
187
187
## About the code
@@ -306,7 +306,7 @@ const msalConfig = {
306
306
307
307
For more information about audiences and account types, please see: [Validation differences by supported account types (signInAudience)](https://docs.microsoft.com/azure/active-directory/develop/supported-accounts-validation)
308
308
309
-
> :warning: Be aware that making an application multi-tenant entails more than just modifying the `authority` string. For more information, please see [How to: Sign in any Azure Active Directory user using the multi-tenant application pattern](https://docs.microsoft.com/azure/active-directory/develop/howto-convert-app-to-be-multi-tenant).
309
+
> :warning: Be aware that making an application multi-tenant entails more than just modifying the `authority` string. For more information, please see [How to: Sign in any Microsoft Entra ID user using the multi-tenant application pattern](https://docs.microsoft.com/azure/active-directory/develop/howto-convert-app-to-be-multi-tenant).
310
310
311
311
### Authentication in national clouds
312
312
@@ -316,10 +316,10 @@ National clouds (aka sovereign clouds) are physically isolated instances of Azur
316
316
* use a specific authority, depending on the cloud in the configuration file for your application.
317
317
* in case you want to call the MS Graph, this requires a specific Graph endpoint URL, depending on the cloud.
318
318
319
-
For instance, to configure this sample for **Azure AD Germany** national cloud:
319
+
For instance, to configure this sample for **Microsoft Entra ID Germany** national cloud:
320
320
321
321
1. Open the `App\authConfig.js` file.
322
-
1. Find the key `Enter_the_Application_Id_Here` and replace the existing value with the application ID (clientId) of the `ms-identity-javascript-tutorial-c1s1` application copied from the Azure portal.
322
+
1. Find the key `Enter_the_Application_Id_Here` and replace the existing value with the application ID (clientId) of the `ms-identity-javascript-tutorial-c1s1` application copied from the Microsoft Entra admin center.
323
323
1. Find the key `https://login.microsoftonline.com/Enter_the_Tenant_Info_Here` and replace the existing value with `https://portal.microsoftazure.de/<your-tenant-id>`.
324
324
325
325
See [National Clouds](https://docs.microsoft.com/azure/active-directory/develop/authentication-national-cloud#app-registration-endpoints) for more information.
@@ -336,15 +336,15 @@ This project has adopted the [Microsoft Open Source Code of Conduct](https://ope
336
336
337
337
## Learn More
338
338
339
-
* [Microsoft identity platform (Azure Active Directory for developers)](https://docs.microsoft.com/azure/active-directory/develop/)
340
-
* [Azure AD code samples](https://docs.microsoft.com/azure/active-directory/develop/sample-v2-code)
339
+
* [Microsoft identity platform (Microsoft Entra ID for developers)](https://docs.microsoft.com/azure/active-directory/develop/)
340
+
* [Microsoft Entra ID code samples](https://docs.microsoft.com/azure/active-directory/develop/sample-v2-code)
341
341
* [Overview of Microsoft Authentication Library (MSAL)](https://docs.microsoft.com/azure/active-directory/develop/msal-overview)
342
342
* [Register an application with the Microsoft identity platform](https://docs.microsoft.com/azure/active-directory/develop/quickstart-register-app)
343
343
* [Configure a client application to access web APIs](https://docs.microsoft.com/azure/active-directory/develop/quickstart-configure-app-access-web-apis)
344
-
* [Understanding Azure AD application consent experiences](https://docs.microsoft.com/azure/active-directory/develop/application-consent-experience)
344
+
* [Understanding Microsoft Entra application consent experiences](https://docs.microsoft.com/azure/active-directory/develop/application-consent-experience)
345
345
* [Understand user and admin consent](https://docs.microsoft.com/azure/active-directory/develop/howto-convert-app-to-be-multi-tenant#understand-user-and-admin-consent)
346
-
* [Application and service principal objects in Azure Active Directory](https://docs.microsoft.com/azure/active-directory/develop/app-objects-and-service-principals)
347
-
* [Authentication Scenarios for Azure AD](https://docs.microsoft.com/azure/active-directory/develop/authentication-flows-app-scenarios)
346
+
* [Application and service principal objects in Microsoft Entra ID](https://docs.microsoft.com/azure/active-directory/develop/app-objects-and-service-principals)
347
+
* [Authentication Scenarios for Microsoft Entra ID](https://docs.microsoft.com/azure/active-directory/develop/authentication-flows-app-scenarios)
348
348
* [Building Zero Trust ready apps](https://aka.ms/ztdevsession)
* [Initialize client applications using MSAL.js](https://docs.microsoft.com/azure/active-directory/develop/msal-js-initializing-client-applications)
@@ -353,4 +353,4 @@ This project has adopted the [Microsoft Open Source Code of Conduct](https://ope
353
353
* [Logging in MSAL.js applications](https://docs.microsoft.com/azure/active-directory/develop/msal-logging?tabs=javascript)
354
354
* [Pass custom state in authentication requests using MSAL.js](https://docs.microsoft.com/azure/active-directory/develop/msal-js-pass-custom-state-authentication-request)
355
355
* [Prompt behavior in MSAL.js interactive requests](https://docs.microsoft.com/azure/active-directory/develop/msal-js-prompt-behavior)
356
-
* [Use MSAL.js to work with Azure AD B2C](https://docs.microsoft.com/azure/active-directory/develop/msal-b2c-overview)
356
+
* [Use MSAL.js to work with Azure Active Directory B2C](https://docs.microsoft.com/azure/active-directory/develop/msal-b2c-overview)
0 commit comments