aspnetcore/samples/OpenIdConnect.AzureAdSample
Nate McMaster ba8f85d972 Upgrade to VS 2017 2017-01-05 13:53:05 -08:00
..
Properties Update the OIDC AzureAd sample. 2016-05-27 15:00:31 -07:00
AuthPropertiesTokenCache.cs Update the OIDC AzureAd sample. 2016-05-27 15:00:31 -07:00
OpenIdConnect.AzureAdSample.csproj Upgrade to VS 2017 2017-01-05 13:53:05 -08:00
Program.cs Update OIDC Azure Sample 2016-07-11 14:08:27 -07:00
Readme.md Update OIDC Azure Sample 2016-07-11 14:08:27 -07:00
Startup.cs Update signed out redirect url in sample 2016-08-26 08:56:48 -07:00
web.config

Readme.md

How to set up the sample locally

Set up Azure Active Directory

  1. Create your own Azure Active Directory (AD). Save the "tenent name".
  2. Add a new Application: in the Azure AD portal, select Application, and click Add in the drawer.
  3. Set the sign-on url to http://localhost:42023.
  4. Select the newly created Application, navigate to the Configure tab.
  5. Find and save the "Client Id"
  6. In the keys section add a new key. A key value will be generated. Save the value as "Client Secret"

Configure the local environment

  1. Set environment ASPNETCORE_ENVIRONMENT to DEVELOPMENMT. (Working with Multiple Environments)
  2. Set up user secrets:
dotnet user-secrets set oidc:clientid <Client Id>
dotnet user-secrets set oidc:clientsecret <Client Secret>
dotnet user-secrets set oidc:authority https://login.windows.net/<Tenent Name>.onmicrosoft.com