Skip to content

Commit 712b574

Browse files
authored
Merge pull request #239430 from MicrosoftDocs/main
5/26 AM Publish
2 parents 08efc6b + 5542e90 commit 712b574

File tree

44 files changed

+4751
-4524
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+4751
-4524
lines changed

articles/active-directory/develop/howto-restore-app.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ This is because organization-specific settings are stored on a separate object,
5959
2. Select **Restore app registration**.
6060

6161
## Permanently delete an application
62-
You can manually permanently delete an application from your organization. A permanently deleted application can't be restored by you, another administrator, or by Microsoft customer support.
62+
You can manually permanently delete an application from your organization. A permanently deleted application can't be restored by you, another administrator, or by Microsoft customer support. However, this does not permanently delete the corresponding service principal. A service principal cannot be restored without having an active corresponding application, so the service principal can be manually deleted, which is also permanent. If no action is taken the service principal will be permanently deleted 30 days after deleting the application.
6363

6464
### To permanently delete an application
6565

articles/active-directory/external-identities/customers/how-to-single-page-app-vanillajs-configure-authentication.md

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,11 @@ description: Learn how to configure authentication for a vanilla JavaScript sing
44
services: active-directory
55
author: OwenRichards1
66
manager: CelesteDG
7-
87
ms.author: owenrichards
98
ms.service: active-directory
10-
ms.workload: identity
119
ms.subservice: ciam
1210
ms.topic: how-to
13-
ms.date: 05/23/2023
14-
ms.custom: developer
11+
ms.date: 05/25/2023
1512

1613
#Customer intent: As a developer, I want to learn how to configure vanilla JavaScript single-page app (SPA) to sign in and sign out users with my Azure Active Directory (AD) for customers tenant.
1714
---
@@ -28,9 +25,7 @@ In the previous article, you created a vanilla JavaScript (JS) single-page appli
2825

2926
The application uses the [Implicit Grant Flow](../../develop/v2-oauth2-implicit-grant-flow.md) to authenticate users. The Implicit Grant Flow is a browser-based flow that doesn't require a back-end server. The flow redirects the user to the sign-in page, where the user signs in and consents to the permissions that are being requested by the application. The purpose of *authConfig.js* is to configure the authentication flow.
3027

31-
1. In your IDE, create a new folder and name it **public**
32-
1. In the *public* folder, create a new file and name it *authConfig.js*.
33-
1. Open *authConfig.js* and add the following code snippet:
28+
1. In the *public* folder, open *authConfig.js* and add the following code snippet:
3429

3530
```javascript
3631
/**
@@ -93,16 +88,15 @@ The application uses the [Implicit Grant Flow](../../develop/v2-oauth2-implicit-
9388
}
9489
```
9590

96-
1. Find the `Enter_the_Application_Id_Here` value and replace it with the application ID (clientId) of the app you registered in the Microsoft Entra admin center.
91+
1. Find the `Enter_the_Application_Id_Here` value and replace it with the **application ID (clientId)** of the app you registered in the Microsoft Entra admin center.
9792
1. In **Authority**, find `Enter_the_Tenant_Subdomain_Here` and replace it with the subdomain of your tenant. For example, if your tenant primary domain is *caseyjensen@onmicrosoft.com*, the value you should enter is *casyjensen*.
9893
1. Save the file.
9994

10095
## Creating the redirection file
10196

102-
A redirection file is required to handle the response from the sign-in page. The redirection file is used to extract the access token from the URL fragment and use it to call the protected API.
97+
A redirection file is required to handle the response from the sign-in page. The redirection file is used to extract the access token from the URL fragment and use it to call the protected API. The redirection file is also used to handle errors that occur during the authentication process.
10398

104-
1. In the *public* folder, create a new file and name it *authRedirect.js*.
105-
1. Open *authRedirect.js* and add the following code snippet:
99+
1. In the *public* folder, open *authRedirect.js* and add the following code snippet:
106100

107101
```javascript
108102
// Create the main myMSALObj instance
@@ -189,10 +183,9 @@ A redirection file is required to handle the response from the sign-in page. The
189183

190184
## Creating the authPopup.js file
191185

192-
The application uses *authPopup.js* to handle the authentication flow when the user signs in using the pop-up window. The pop-up window is used when the user is already signed in and the application needs to get an access token for a different resource.
186+
The application uses *authPopup.js* to handle the authentication flow when the user signs in using the pop-up window. The pop-up window is used when the user is already signed in and the application needs to get an access token for a different resource.
193187

194-
1. In the *public* folder, create a new file and name it *authPopup.js*.
195-
1. Open *authPopup.js* and add the following code snippet:
188+
1. In the *public* folder, open *authPopup.js* and add the following code snippet:
196189

197190
```javascript
198191
// Create the main myMSALObj instance

articles/active-directory/external-identities/customers/how-to-single-page-app-vanillajs-prepare-app.md

Lines changed: 23 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,26 @@
11
---
2-
title: Prepare a vanilla JavaScript single-page app for authentication
2+
title: Prepare a vanilla JavaScript single-page application for authentication
33
description: Learn how to prepare a vanilla JavaScript single-page app (SPA) for authentication and authorization with your Azure Active Directory (AD) for customers tenant.
44
services: active-directory
55
author: OwenRichards1
66
manager: CelesteDG
77
ms.author: owenrichards
88
ms.service: active-directory
9-
ms.workload: identity
109
ms.subservice: ciam
1110
ms.topic: how-to
12-
ms.date: 05/23/2023
13-
ms.custom: developer
11+
ms.date: 05/25/2023
1412

1513
#Customer intent: As a developer, I want to learn how to configure vanilla JavaScript single-page app (SPA) to sign in and sign out users with my Azure AD for customers tenant.
1614
---
1715

18-
# Prepare a Single-page application for authentication
16+
# Prepare a vanilla JavaScript single-page application for authentication
1917

20-
After registering an application and creating a user flow in a Azure Active Directory (AD) for customers tenant, a vanilla JavaScript (JS) single-page application (SPA) can be created using an integrated development environment (IDE) or a code editor. In this article, you'll create a vanilla JS SPA and a server to host the application.
18+
After registering an application and creating a user flow in an Azure Active Directory (AD) for customers tenant, a vanilla JavaScript (JS) single-page application (SPA) can be created using an integrated development environment (IDE) or a code editor. In this article, you'll create a vanilla JS SPA and a server to host the application.
2119

2220
## Prerequisites
2321

24-
- Completion of the prerequisites and steps in [Sign in users to a vanilla JS Single-page application](how-to-single-page-app-vanillajs-prepare-tenant.md).
25-
- Although any IDE that supports vanilla JS applications can be used, **Visual Studio Code** is used for this guide. It can be downloaded from the [Downloads](https://visualstudio.microsoft.com/downloads) page.
22+
- Completion of the prerequisites and steps in [Sign in users to a vanilla JS single-page application](how-to-single-page-app-vanillajs-prepare-tenant.md).
23+
- Although any IDE that supports vanilla JS applications can be used, **Visual Studio Code** is recommended for this guide. It can be downloaded from the [Downloads](https://visualstudio.microsoft.com/downloads) page.
2624
- [Node.js](https://nodejs.org/en/download/).
2725

2826
## Create a new vanilla JS project and install dependencies
@@ -33,6 +31,21 @@ After registering an application and creating a user flow in a Azure Active Dire
3331
```powershell
3432
npm init -y
3533
```
34+
1. Create additional folders and files to achieve the following project structure:
35+
36+
```
37+
└── public
38+
└── authConfig.js
39+
└── authPopup.js
40+
└── authRedirect.js
41+
└── index.html
42+
└── signout.html
43+
└── styles.css
44+
└── ui.js
45+
└── server.js
46+
```
47+
48+
## Install app dependencies
3649
3750
1. In the **Terminal**, run the following command to install the required dependencies for the project:
3851
@@ -87,6 +100,8 @@ After registering an application and creating a user flow in a Azure Active Dire
87100
88101
```
89102
103+
In this code, the **app** variable is initialized with the **express** module and **express** is used to serve the public assets. **Msal-browser** is served as a static asset and is used to initiate the authentication flow.
104+
90105
## Next steps
91106
92107
> [!div class="nextstepaction"]

articles/active-directory/external-identities/customers/how-to-single-page-app-vanillajs-prepare-tenant.md

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,26 @@
11
---
2-
title: Prepare your tenant to use a vanilla JavaScript single-page app for authentication.
2+
title: Prepare your customer tenant to authenticate a vanilla JavaScript single-page application.
33
description: Learn how to configure your Azure Active Directory (AD) for customers tenant for authentication with a vanilla JavaScript single-page app (SPA).
44
services: active-directory
55
author: OwenRichards1
66
manager: CelesteDG
77
ms.author: owenrichards
88
ms.service: active-directory
9-
ms.workload: identity
109
ms.subservice: ciam
1110
ms.topic: how-to
12-
ms.date: 05/23/2023
13-
ms.custom: developer
11+
ms.date: 05/25/2023
12+
1413

1514
#Customer intent: As a developer, I want to learn how to configure vanilla JavaScript single-page app (SPA) to sign in and sign out users with my Azure Active Directory (AD) for customers tenant.
1615
---
1716

18-
# Sign in users to a vanilla JS single-page application - Prepare your tenant
17+
# Prepare your customer tenant to authenticate a vanilla JavaScript single-page application.
1918

2019
This how-to guide demonstrates how to prepare your Azure Active Directory (Azure AD) for customers tenant for authentication. You'll register a single-page application (SPA) in the Microsoft Entra admin center, and record its identifiers. You'll then create a sign in and sign out user flow in the Microsoft Entra admin center and associate your SPA with the user flow.
2120

2221
## Prerequisites
2322

2423
- Azure AD for customers tenant. If you don't already have one, <a href="https://aka.ms/ciam-free-trial?wt.mc_id=ciamcustomertenantfreetrial_linkclick_content_cnl" target="_blank">sign up for a free trial</a>.
25-
2624
- If you have already registered a SPA in the Microsoft Entra admin center, and associated it with a user flow, you can skip the steps in this article and move to [Prepare a vanilla JavaScript single-page app for authentication](how-to-single-page-app-vanillajs-prepare-app.md).
2725

2826
## Register the SPA

articles/active-directory/external-identities/customers/how-to-single-page-app-vanillajs-sample-sign-in.md

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,25 +4,23 @@ description: Learn how to configure a sample JavaSCript single-page application
44
services: active-directory
55
author: OwenRichards1
66
manager: CelesteDG
7-
87
ms.author: owenrichards
98
ms.service: active-directory
10-
ms.workload: identity
119
ms.subservice: ciam
1210
ms.topic: how-to
13-
ms.date: 05/23/2023
14-
ms.custom: developer
11+
ms.date: 05/25/2023
12+
1513

1614
#Customer intent: As a dev, devops, I want to learn about how to configure a sample vanilla JS SPA to sign in and sign out users with my Azure Active Directory (Azure AD) for customers tenant
1715
---
1816

1917
# Sign in users in a sample vanilla JavaScript single-page application
2018

21-
This how-to guide uses a sample vanilla JavaScript single-page Application (SPA) to demonstrate how to add authentication to a SPA. This SPA enables users to sign in and sign out by using their own Azure Azure Active Directory (AD) for customers tenant. The sample uses the [Microsoft Authentication Library for JavaScript (MSAL.js)](https://github.com/AzureAD/microsoft-authentication-library-for-js) to handle authentication.
19+
This how-to guide uses a sample vanilla JavaScript single-page Application (SPA) to demonstrate how to add authentication to a SPA. The SPA enables users to sign in and sign out by using their own Azure Azure Active Directory (AD) for customers tenant. The sample uses the [Microsoft Authentication Library for JavaScript (MSAL.js)](https://github.com/AzureAD/microsoft-authentication-library-for-js) to handle authentication.
2220

2321
## Prerequisites
2422

25-
* Although any IDE that supports vanilla JS applications can be used, **Visual Studio Code** is used for this guide. It can be downloaded from the [Downloads](https://visualstudio.microsoft.com/downloads) page.
23+
* Although any IDE that supports vanilla JS applications can be used, **Visual Studio Code** is recommended for this guide. It can be downloaded from the [Downloads](https://visualstudio.microsoft.com/downloads) page.
2624
* [Node.js](https://nodejs.org/en/download/).
2725
* Azure AD for customers tenant. If you don't already have one, <a href="https://aka.ms/ciam-free-trial?wt.mc_id=ciamcustomertenantfreetrial_linkclick_content_cnl" target="_blank">sign up for a free trial</a>.
2826

@@ -103,4 +101,5 @@ If you choose to download the `.zip` file, extract the sample app file to a fold
103101
104102
## Next steps
105103
106-
Learn how to use the Microsoft Authentication Library (MSAL) for JavaScript to sign in users and acquire tokens to call Microsoft Graph.
104+
> [!div class="nextstepaction"]
105+
> [Enable self-service password reset](./how-to-enable-password-reset-customers.md)

articles/active-directory/external-identities/customers/how-to-single-page-app-vanillajs-sign-in-sign-out.md

Lines changed: 13 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,17 @@ description: Learn how to configure a vanilla JavaScript single-page app (SPA) t
44
services: active-directory
55
author: OwenRichards1
66
manager: CelesteDG
7-
87
ms.author: owenrichards
98
ms.service: active-directory
10-
ms.workload: identity
119
ms.subservice: ciam
1210
ms.topic: how-to
13-
ms.date: 05/23/2023
14-
ms.custom: developer
11+
ms.date: 05/25/2023
12+
1513

1614
#Customer intent: As a developer, I want to learn how to configure vanilla JavaScript single-page app (SPA) to sign in and sign out users with my Azure Active Directory (AD) for customers tenant.
1715
---
1816

19-
# Configure a Single-page application User Interface and Sign-In
17+
# Configure a single-page application user interface and sign-In
2018

2119
When authorization has been configured, the user interface can be created to allow users to sign in and sign out when the project is run. To build the user interface (UI) for the application, [Bootstrap](https://getbootstrap.com/) is used to create a responsive UI that contains a **Sign-In** and **Sign-Out** button. Next, you'll run the project and test the sign-in and sign-out functionality.
2220

@@ -26,10 +24,9 @@ When authorization has been configured, the user interface can be created to all
2624

2725
## Create the *index.html* file
2826

29-
The main page of the application, *index.html*, is the first page that is loaded when the application is started. It's also the page that is loaded when the user selects the **Sign Out** button.
27+
The main page of the application, *index.html*, is the first page that is loaded when the application is started. It's also the page that is loaded when the user selects the **Sign-Out** button.
3028

31-
1. In the *public* folder, create a new file named *index.html*. This file contains the HTML for the main page of the application.
32-
1. Open *index.html* and add the following code snippet:
29+
1. In the *public* folder, open *index.html* and add the following code snippet:
3330

3431
```html
3532
<!DOCTYPE html>
@@ -103,8 +100,7 @@ The main page of the application, *index.html*, is the first page that is loaded
103100

104101
## Create the *signout.html* file
105102

106-
1. In the *public* folder, create a new file named *signout.html*. This file contains the HTML for the sign-out page of the application.
107-
1. Open *signout.html* and add the following code snippet:
103+
1. In the *public* folder, open *signout.html* and add the following code snippet:
108104

109105
```html
110106
<!DOCTYPE html>
@@ -132,8 +128,7 @@ The main page of the application, *index.html*, is the first page that is loaded
132128

133129
## Create the *ui.js* file
134130

135-
1. In the *public* folder, create a new file named *ui.js*. This file contains the JavaScript code for the UI of the application.
136-
1. Open *ui.js* and add the following code snippet:
131+
1. In the *public* folder, open *ui.js* and add the following code snippet:
137132

138133
```javascript
139134
// Select DOM elements to work with
@@ -173,8 +168,7 @@ The main page of the application, *index.html*, is the first page that is loaded
173168

174169
## Create the styles.css file
175170

176-
1. In the *public* folder, create a new file named *styles.css*. This file contains the CSS code for the UI of the application.
177-
1. Open *styles.css* and add the following code snippet:
171+
1. In the *public* folder, open *styles.css* and add the following code snippet:
178172

179173
```css
180174
.navbarStyle {
@@ -215,7 +209,9 @@ Now that all the required code snippets have been added, the application can be
215209
1. A window appears asking which account to sign out of.
216210
1. Upon successful sign out, a final window appears advising you to close all browser windows.
217211

218-
## Next steps
212+
## See also
219213

220-
> [!div class="nextstepaction"]
221-
> [Enable self-service password reset](./how-to-enable-password-reset-customers.md)
214+
- [Enable self-service password reset](./how-to-enable-password-reset-customers.md)
215+
- [Customize the default branding](how-to-customize-branding-customers.md)
216+
- [Configure sign-in with Google](how-to-google-federation-customers.md)
217+
- [Sign in users in your own ASP.NET web application by using an Azure AD for customers tenant](how-to-web-app-dotnet-sign-in-prepare-app.md)

0 commit comments

Comments
 (0)