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
In this quickstart, you download and run a code sample that demonstrates how an ASP.NET Core web app can sign in users from any Azure Active Directory (Azure AD) organization.
20
20
21
-
The following diagram shows how the sample app works:
22
-
23
-

21
+
See [How the sample works](#how-the-sample-works) for an illustration.
24
22
25
23
## Prerequisites
26
24
@@ -48,7 +46,6 @@ The following diagram shows how the sample app works:
48
46
49
47
#### Step 2: Download the ASP.NET Core project
50
48
51
-
52
49
[Download the ASP.NET Core solution](https://github.com/Azure-Samples/active-directory-aspnetcore-webapp-openidconnect-v2/archive/aspnetcore3-1.zip)
@@ -91,6 +88,10 @@ After consenting to the requested permissions, the app displays that you've succ
91
88
92
89
This section gives an overview of the code required to sign in users and call the Microsoft Graph API on their behalf. This overview can be useful to understand how the code works, main arguments, and also if you want to add sign-in to an existing ASP.NET Core application and call Microsoft Graph. It uses [Microsoft.Identity.Web](../../microsoft-identity-web.md), which is a wrapper around [MSAL.NET](../../msal-overview.md).
93
90
91
+
### How the sample works
92
+
93
+

94
+
94
95
### Startup class
95
96
96
97
The *Microsoft.AspNetCore.Authentication* middleware uses a `Startup` class that's executed when the hosting process starts:
# Customer intent: As an application developer, I want to see a sample ASP.NET web app that can sign in Azure AD users.
17
17
---
18
18
19
-
In this quickstart, you download and run a code sample that demonstrates an ASP.NET web application that can sign in users with Azure Active Directory (Azure AD) accounts.
19
+
In this quickstart, you download and run a code sample that demonstrates an ASP.NET web application that can sign in users with Azure Active Directory (Azure AD) accounts.
20
20
21
-
The following diagram shows how the sample app works:
22
-
23
-

21
+
See [How the sample works](#how-the-sample-works) for an illustration.
24
22
25
23
## Prerequisites
26
24
@@ -55,13 +53,12 @@ If you want to manually configure your application and code sample, use the foll
55
53
56
54
#### Step 2: Download the project
57
55
58
-
59
-
[Download the Visual Studio 2019 solution](https://github.com/AzureADQuickStarts/AppModelv2-WebApp-OpenIDConnect-DotNet/archive/master.zip)
56
+
[Download the ASP.NET code sample](https://github.com/AzureADQuickStarts/AppModelv2-WebApp-OpenIDConnect-DotNet/archive/master.zip)
@@ -78,15 +84,15 @@ Provide the parameters in `exports.creds` in config.js as instructed.
78
84
* Update `exports.destroySessionUrl` in config.js, if you want to use a different `post_logout_redirect_uri`.
79
85
80
86
* Set `exports.useMongoDBSessionStore` in config.js to true, if you want to use [mongoDB](https://www.mongodb.com) or other [compatible session stores](https://github.com/expressjs/session#compatible-session-stores).
81
-
The default session store in this sample is `express-session`. The default session store is not suitable for production.
87
+
The default session store in this sample is `express-session`. The default session store isn't suitable for production.
82
88
83
89
* Update `exports.databaseUri`, if you want to use mongoDB session store and a different database URI.
84
90
85
91
* Update `exports.mongoDBSessionMaxAge`. Here you can specify how long you want to keep a session in mongoDB. The unit is second(s).
86
92
87
93
## Build and run the application
88
94
89
-
Start mongoDB service. If you are using mongoDB session store in this app, you have to [install mongoDB](http://www.mongodb.org/) and start the service first. If you are using the default session store, you can skip this step.
95
+
Start mongoDB service. If you're using mongoDB session store in this app, you have to [install mongoDB](http://www.mongodb.org/) and start the service first. If you're using the default session store, you can skip this step.
90
96
91
97
Run the app using the following command from your command line.
92
98
@@ -104,7 +110,7 @@ $ node app.js | bunyan
104
110
105
111
### You're done!
106
112
107
-
You will have a server successfully running on `http://localhost:3000`.
113
+
You'll have a server successfully running on `http://localhost:3000`.
108
114
109
115
[!INCLUDE [Help and support](../../../../../includes/active-directory-develop-help-support-include.md)]
0 commit comments