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-Authentication/1-sign-in/AppCreationScripts/AppCreationScripts.md
+9-9Lines changed: 9 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -11,7 +11,7 @@
11
11
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope Process -Force
12
12
```
13
13
14
-
1. Run the script to create your Azure AD application and configure the code of the sample application accordingly.
14
+
1. Run the script to create your Microsoft Entra application and configure the code of the sample application accordingly.
15
15
16
16
```PowerShell
17
17
cd .\AppCreationScripts\
@@ -35,23 +35,23 @@
35
35
36
36
### Presentation of the scripts
37
37
38
-
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.
38
+
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.
39
39
40
40
These scripts are:
41
41
42
42
-`Configure.ps1` which:
43
-
- creates Azure AD applications and their related objects (permissions, dependencies, secrets, app roles),
43
+
- creates Microsoft Entra applications and their related objects (permissions, dependencies, secrets, app roles),
44
44
- changes the configuration files in the sample projects.
45
-
- 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:
45
+
- 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:
46
46
- the identifier of the application
47
47
- the AppId of the application
48
-
- the url of its registration in the [Azure portal](https://portal.azure.com).
48
+
- the url of its registration in the [Microsoft Entra admin center](https://entra.microsoft.com).
49
49
50
-
-`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`).
50
+
-`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`).
51
51
52
52
### Usage pattern for tests and DevOps scenarios
53
53
54
-
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.
54
+
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.
55
55
56
56
## How to use the app creation scripts?
57
57
@@ -118,8 +118,8 @@ Note that the script will choose the tenant in which to create the applications,
118
118
119
119
if you want to create the apps in a particular tenant, you can use the following option:
120
120
121
-
- Open the [Azure portal](https://portal.azure.com)
122
-
- Select the Azure Active directory you are interested in (in the combo-box below your name on the top right of the browser window)
121
+
- Open the [Microsoft Entra admin center](https://entra.microsoft.com)
122
+
- Select the Microsoft Entra ID you are interested in (in the combo-box below your name on the top right of the browser window)
123
123
- Find the "Active Directory" object in this tenant
124
124
- Go to **Properties** and copy the content of the **Directory Id** property
Copy file name to clipboardExpand all lines: 1-Authentication/1-sign-in/README.md
+28-28Lines changed: 28 additions & 28 deletions
Original file line number
Diff line number
Diff line change
@@ -1,23 +1,23 @@
1
1
---
2
2
page_type: sample
3
-
name: Vanilla JavaScript single-page application using MSAL.js to authenticate users with Azure Active Directory
4
-
description: Vanilla JavaScript single-page application using MSAL.js to authenticate users with Azure Active Directory
3
+
name: Vanilla JavaScript single-page application using MSAL.js to authenticate users with Microsoft Entra ID
4
+
description: Vanilla JavaScript single-page application using MSAL.js to authenticate users with Microsoft Entra ID
5
5
languages:
6
6
- javascript
7
7
products:
8
-
- azure-active-directory
8
+
- microsoft-entra-id
9
9
- msal-js
10
10
- msal-browser
11
11
urlFragment: ms-identity-javascript-tutorial
12
12
extensions:
13
13
- services: ms-identity
14
14
- platform: JavaScript
15
-
- endpoint: AAD v2.0
15
+
- endpoint: Microsoft identity platform
16
16
- level: 100
17
17
- client: Vanilla JavaScript SPA
18
18
---
19
19
20
-
# Vanilla JavaScript single-page application using MSAL.js to authenticate users with Azure Active Directory
20
+
# Vanilla JavaScript single-page application using MSAL.js to authenticate users with Microsoft Entra ID
21
21
22
22
*[Overview](#overview)
23
23
*[Scenario](#scenario)
@@ -33,11 +33,11 @@ extensions:
33
33
34
34
## Overview
35
35
36
-
This sample demonstrates a Vanilla JavaScript single-page application (SPA) that lets users sign-in to [Azure Active Directory](https://docs.microsoft.com/azure/active-directory/fundamentals/active-directory-whatis) (Azure AD) using the [Microsoft Authentication Library for JavaScript](https://github.com/AzureAD/microsoft-authentication-library-for-js) (MSAL.js). In doing so, it also illustrates various authentication concepts, such as [ID Tokens](https://docs.microsoft.com/azure/active-directory/develop/id-tokens), [OIDC scopes](https://docs.microsoft.com/azure/active-directory/develop/v2-permissions-and-consent#openid-connect-scopes), [single-sign on](https://docs.microsoft.com/azure/active-directory/develop/msal-js-sso), **account selection**, **silent requests** and more.
36
+
This sample demonstrates a Vanilla JavaScript single-page application (SPA) that lets users sign-in to [Microsoft Entra ID](https://docs.microsoft.com/azure/active-directory/fundamentals/active-directory-whatis) (Microsoft Entra ID) using the [Microsoft Authentication Library for JavaScript](https://github.com/AzureAD/microsoft-authentication-library-for-js) (MSAL.js). In doing so, it also illustrates various authentication concepts, such as [ID Tokens](https://docs.microsoft.com/azure/active-directory/develop/id-tokens), [OIDC scopes](https://docs.microsoft.com/azure/active-directory/develop/v2-permissions-and-consent#openid-connect-scopes), [single-sign on](https://docs.microsoft.com/azure/active-directory/develop/msal-js-sso), **account selection**, **silent requests** and more.
37
37
38
38
## Scenario
39
39
40
-
1. The client application uses **MSAL.js** to sign-in a user and obtain an **ID Token** from **Azure AD**.
40
+
1. The client application uses **MSAL.js** to sign-in a user and obtain an **ID Token** from **Microsoft Entra ID**.
41
41
2. The **ID Token** proves that the user has successfully signed-in with their organization's tenant.
42
42
43
43

@@ -59,10 +59,10 @@ This sample demonstrates a Vanilla JavaScript single-page application (SPA) that
59
59
*[Visual Studio Code](https://code.visualstudio.com/download) is recommended for running and editing this sample.
60
60
*[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.
61
61
* A modern web browser.
62
-
* 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)
63
-
* A user account in your **Azure AD** tenant.
62
+
* 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)
63
+
* A user account in your **Microsoft Entra ID** tenant.
64
64
65
-
>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.
65
+
>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.
66
66
67
67
## Setup the sample
68
68
@@ -91,7 +91,7 @@ There is one project in this sample. To register it, you can:
91
91
92
92
* follow the steps below for manually register your apps
93
93
* or use PowerShell scripts that:
94
-
***automatically** creates the Azure AD applications and related objects (passwords, permissions, dependencies) for you.
94
+
***automatically** creates the Microsoft Entra applications and related objects (passwords, permissions, dependencies) for you.
95
95
* modify the projects' configuration files.
96
96
97
97
<details>
@@ -106,7 +106,7 @@ There is one project in this sample. To register it, you can:
106
106
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope Process -Force
107
107
```
108
108
109
-
1. Run the script to create your Azure AD application and configure the code of the sample application accordingly.
109
+
1. Run the script to create your Microsoft Entra application and configure the code of the sample application accordingly.
110
110
1. For interactive process -in PowerShell, run:
111
111
112
112
```PowerShell
@@ -118,16 +118,16 @@ There is one project in this sample. To register it, you can:
118
118
119
119
</details>
120
120
121
-
#### Choose the Azure AD tenant where you want to create your applications
121
+
#### Choose the Microsoft Entra tenant where you want to create your applications
122
122
123
123
To manually register the apps, as a first step you'll need to:
124
124
125
-
1. Sign in to the [Azure portal](https://portal.azure.com).
126
-
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.
125
+
1. Sign in to the [Microsoft Entra admin center](https://entra.microsoft.com).
126
+
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.
127
127
128
128
#### Register the client app (ms-identity-javascript-c1s1)
129
129
130
-
1. Navigate to the [Azure portal](https://portal.azure.com) and select the **Azure Active Directory** service.
130
+
1. Navigate to the [Microsoft Entra admin center](https://entra.microsoft.com) and select the **Microsoft Entra ID** service.
131
131
1. Select the **App Registrations** blade on the left, then select **New registration**.
132
132
1. In the **Register an application page** that appears, enter your application's registration information:
133
133
1. In the **Name** section, enter a meaningful application name that will be displayed to users of the app, for example `ms-identity-javascript-c1s1`.
@@ -157,8 +157,8 @@ Open the project in your IDE (like Visual Studio or Visual Studio Code) to confi
157
157
> In the steps below, "ClientID" is the same as "Application ID" or "AppId".
158
158
159
159
1. Open the `App\authConfig.js` file.
160
-
1. Find the key `Enter_the_Application_Id_Here` and replace the existing value with the application ID (clientId) of `ms-identity-javascript-c1s1` app copied from the Azure portal.
161
-
1. Find the key `Enter_the_Tenant_Info_Here` and replace the existing value with your Azure AD tenant/directory ID.
160
+
1. Find the key `Enter_the_Application_Id_Here` and replace the existing value with the application ID (clientId) of `ms-identity-javascript-c1s1` app copied from the Microsoft Entra admin center.
161
+
1. Find the key `Enter_the_Tenant_Info_Here` and replace the existing value with your Microsoft Entra tenant/directory ID.
162
162
163
163
### Step 4: Running the sample
164
164
@@ -271,7 +271,7 @@ const msalConfig = {
271
271
272
272
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)
273
273
274
-
> :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).
274
+
> :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).
275
275
276
276
### Authentication in National Clouds
277
277
@@ -281,10 +281,10 @@ National clouds (aka Sovereign clouds) are physically isolated instances of Azur
281
281
* use a specific authority, depending on the cloud in the configuration file for your application.
282
282
* in case you want to call the MS Graph, this requires a specific Graph endpoint URL, depending on the cloud.
283
283
284
-
For instance, to configure this sample for **Azure AD Germany** national cloud:
284
+
For instance, to configure this sample for **Microsoft Entra ID Germany** national cloud:
285
285
286
286
1. Open the `App\authConfig.js` file.
287
-
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.
287
+
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.
288
288
1. Find the key `Enter_the_Cloud_Instance_Id_Here/Enter_the_Tenant_Info_Here` and replace the existing value with `https://portal.microsoftazure.de/<your-tenant-id>`.
289
289
1. Find the key `Enter_the_Redirect_Uri_Here` and replace the existing value with the base address of the `ms-identity-javascript-tutorial-c1s1`application (by default `http://localhost:3000`).
290
290
@@ -295,7 +295,7 @@ See [National Clouds](https://docs.microsoft.com/azure/active-directory/develop/
295
295
Learn how to:
296
296
297
297
* [Vanilla JavaScript single-page application using MSAL.js to authorize users for calling Microsoft Graph](https://github.com/Azure-Samples/ms-identity-javascript-tutorial/tree/main/2-Authorization-I/1-call-graph)
298
-
* [Vanilla JavaScript single-page application (SPA) using MSAL.js to authorize users for calling a protected web API on Azure AD](https://github.com/Azure-Samples/ms-identity-javascript-tutorial/tree/main/3-Authorization-II/1-call-api)
298
+
* [Vanilla JavaScript single-page application (SPA) using MSAL.js to authorize users for calling a protected web API on Microsoft Entra ID](https://github.com/Azure-Samples/ms-identity-javascript-tutorial/tree/main/3-Authorization-II/1-call-api)
299
299
300
300
## Contributing
301
301
@@ -305,15 +305,15 @@ This project has adopted the [Microsoft Open Source Code of Conduct](https://ope
305
305
306
306
## Learn More
307
307
308
-
* [Microsoft identity platform (Azure Active Directory for developers)](https://docs.microsoft.com/azure/active-directory/develop/)
309
-
* [Azure AD code samples](https://docs.microsoft.com/azure/active-directory/develop/sample-v2-code)
308
+
* [Microsoft identity platform (Microsoft Entra ID for developers)](https://docs.microsoft.com/azure/active-directory/develop/)
309
+
* [Microsoft Entra ID code samples](https://docs.microsoft.com/azure/active-directory/develop/sample-v2-code)
310
310
* [Overview of Microsoft Authentication Library (MSAL)](https://docs.microsoft.com/azure/active-directory/develop/msal-overview)
311
311
* [Register an application with the Microsoft identity platform](https://docs.microsoft.com/azure/active-directory/develop/quickstart-register-app)
312
312
* [Configure a client application to access web APIs](https://docs.microsoft.com/azure/active-directory/develop/quickstart-configure-app-access-web-apis)
313
-
* [Understanding Azure AD application consent experiences](https://docs.microsoft.com/azure/active-directory/develop/application-consent-experience)
313
+
* [Understanding Microsoft Entra application consent experiences](https://docs.microsoft.com/azure/active-directory/develop/application-consent-experience)
314
314
* [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)
315
-
* [Application and service principal objects in Azure Active Directory](https://docs.microsoft.com/azure/active-directory/develop/app-objects-and-service-principals)
316
-
* [Authentication Scenarios for Azure AD](https://docs.microsoft.com/azure/active-directory/develop/authentication-flows-app-scenarios)
315
+
* [Application and service principal objects in Microsoft Entra ID](https://docs.microsoft.com/azure/active-directory/develop/app-objects-and-service-principals)
316
+
* [Authentication Scenarios for Microsoft Entra ID](https://docs.microsoft.com/azure/active-directory/develop/authentication-flows-app-scenarios)
317
317
* [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)
@@ -322,4 +322,4 @@ This project has adopted the [Microsoft Open Source Code of Conduct](https://ope
322
322
* [Logging in MSAL.js applications](https://docs.microsoft.com/azure/active-directory/develop/msal-logging?tabs=javascript)
323
323
* [Pass custom state in authentication requests using MSAL.js](https://docs.microsoft.com/azure/active-directory/develop/msal-js-pass-custom-state-authentication-request)
324
324
* [Prompt behavior in MSAL.js interactive requests](https://docs.microsoft.com/azure/active-directory/develop/msal-js-prompt-behavior)
325
-
* [Use MSAL.js to work with Azure AD B2C](https://docs.microsoft.com/azure/active-directory/develop/msal-b2c-overview)
325
+
* [Use MSAL.js to work with Azure Active Directory B2C](https://docs.microsoft.com/azure/active-directory/develop/msal-b2c-overview)
0 commit comments