- Sign in to the Microsoft Entra admin center as at least a Cloud Application Administrator.
- If you have access to multiple tenants, use the Settings icon in the top menu to switch to the tenant in which you want to register the application from the Directories + subscriptions menu.
- Browse to Identity > Applications > App registrations and select New registration.
- Enter a Name for your application, for example my-docsie-portal.
- Under Supported account types, select Accounts in this organizational directory only.
- Under Redirect URIs, select Web for the platform.
- Enter a redirect URI of http://localhost:5000/getAToken. You can change this value later.
- Select Register.
- On the app Overview page, note the Application (client) ID value for later use.
- Under Manage, select the Certificates & secrets and from the Client secrets section, select New client secret.
- Enter a description for the client secret, leave the default expiration, and select Add.
- Save the Value of the Client Secret in a safe location. You need this value configure the code, and you can't retrieve it later.
-
Open the application you downloaded
cd docsie-secure-portals-ms-auth
-
Create an
.env
file in the root folder of the project using.env.sample
as a guide.# The following variables are required for the app to run. SECRET_KEY=<generated_random_secret_key> AZURE_AD_CLIENT_ID=<Enter_your_client_id> AZURE_AD_CLIENT_SECRET=<Enter_your_client_secret> AZURE_AD_AUTHORITY=<Enter_your_authority_url> AZURE_AD_REDIRECT_URI=<Enter_redirect_uri> DOCSIE_PORTAL_MASTER_KEY=<Enter_your_portal_master_key> DOCSIE_PORTAL_URL=<Enter_your_portal_url>
- Set the value of
SECRET_KEY
to the generated random string. - Set the value of
AZURE_AD_CLIENT_ID
to the Application (client) ID for the registered application, available on the overview page. - Set the value of
AZURE_AD_CLIENT_SECRET
to the client secret you created in the Certificates & Secrets for the registered application. - Set the value of
AZURE_AD_AUTHORITY
to ahttps://login.microsoftonline.com/<TENANT_GUID>
. The Directory (tenant) ID is available on the app registration overview page. - Set the value of
AZURE_AD_REDIRECT_URI
to thehttp://localhost:5000/getAToken
(or the one you entered in the Redirect URIs of the application). - Set the value of
DOCSIE_PORTAL_MASTER_KEY
to the master key for portal deployment. - Set the value of
DOCSIE_PORTAL_URL
to the URL of your portal.
- Set the value of
Using Docker Compose:
docker compose up -d