This is a sample app featuring the Azure Active Directory authentication sample for DotVVM.
-
Sign in to the Azure Portal and open (or create) your Azure Active Directory resource.
-
Open the Properties tab and copy the Directory ID value. Paste it in the
ida:TenantId
application setting in theweb.config
file. -
Open the App registrations tab and open (or create) the app registration.
-
Copy the Application ID value and paste it in the
ida:ClientId
application setting in theweb.config
file. -
Make sure that the URL on which the web app is running, is listed in the Home Page field or in the Reply URLs section. The URL must match including the HTTP/HTTPS and port.
Now the application should work with all accounts from the directory.
If you want to make the application multi-tenant (to allow the users to sign in even if they are from a different Azure Active Directory tenant), you need to make these changes:
-
In the Properties tab of the App Registration, switch the Multi-tenanted field to Yes.
-
In the
web.config
, change theida:TenantId
to the valuecommon
.
We are still working on the ASP.NET Core version of this sample. The principles are the same, however there are some issues with the Open ID Connect library.