aspnetcore/samples/OpenIdConnect.AzureAdSample
Pranav K f8711a2da3 Update samples and tests to target netcoreapp2.1 2017-11-13 17:24:59 -08:00
..
Properties
AuthPropertiesTokenCache.cs Auth 2.0 2017-04-19 13:00:03 -07:00
OpenIdConnect.AzureAdSample.csproj Update samples and tests to target netcoreapp2.1 2017-11-13 17:24:59 -08:00
Program.cs Update default settings for SameSite 2017-05-26 12:19:18 -07:00
Readme.md Fix typo in Azure AD sample README.md (#1155) 2017-03-20 15:12:02 -07:00
Startup.cs #1319 Add DisplayName overloads 2017-07-13 15:20:24 -07:00

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 DEVELOPMENT. (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