Authentication with Microsoft Account
- Register a AAD app in the Azure Active Directory > App registrations area of the Azure portal.
- Provide a Name for the app (for example,
kmlog-<username>
). - In Supported account types, select
Accounts in any organizational directory (Any Azure AD directory - Multitenant) and personal Microsoft accounts (e.g. Skype, Xbox)
. - Leave the Redirect URI drop down set to Web and provide the following redirect URI:
- Dev:
http://localhost/signin-microsoft
- Other:
https://<DOMAIN>/signin-microsoft
- Dev:
- Select Register. (the following steps are in the newly registered app)
- Check
Application (client) ID
inOverview
. - Add Client Secret in
Certificates & Secrets
. - Store
Client Id
andClient Secret
inappsettings.json
orsecrets.json
(app secrets) ofKmLog.Server.WebApi
in the following format:
{
"Azure": {
"ClientId": "<CLIENT_ID>",
"ClientSecret": "<CLIENT_SECRET>"
}
}
Use the docker-compose
in KmLog.Server\docker-compose.database
as mssql database.
docker-compose up
Add emails of authorized Microsoft account(s):
- Manually insert into database
insert into [User]
(Id, Email, Role)
values
(newid(), 'valid@email.com', 0)
- Add comma-separated list via command line arguments: (
"valid@email.com,..."
)