Azure AD OAuth2
How to connect Azure Active Directory (AD) Single Sign-On (SSO) with OAuth2 in UI Bakery
Last updated
How to connect Azure Active Directory (AD) Single Sign-On (SSO) with OAuth2 in UI Bakery
Last updated
© 2024 UI Bakery
An Azure account with an active subscription.
Administrator rights on Microsoft Entra ID (former Active Directory).
A UI Bakery application up and running.
Click on "Microsoft Entra ID" from the sidebar.
Choose "App registrations" and then click on "New registration".
Name your application.
Set the supported account types.
Set the redirect URI to https://YOUR_INSTANCE/auth/oauth2/callback
Click "Register" to create the application.
Go to the "Overview" tab of your newly created Azure application.
Note down the "Application (client) ID".
Navigate to "Certificates & secrets".
Click on "New client secret" and follow the prompts.
Docker compose setup may be restarted with the following command:
If you need to enable role synchronization, then groups claim must be included in the access token. To achieve this, follow these steps:
Add groups claim in "Token configuration" section. Select groups types according to your requirements.
In the "Expose an API" section, configure Application ID URI with default value and create a new scope. Set the scope name to groups
and configure the necessary settings
In the "API permissions" section, click Add a permission, select the APIs my organization uses tab, and search for the previously created scope by typing your app registration name or id.
Update the following environment variables and then restart your instance:
Attempt to log in to your UI Bakery application with `Login with Microsoft` button.
You should be redirected to the Azure AD login page.
After successful authentication, you should be redirected back to your UI Bakery application.
If you encounter issues during the integration, consider checking the following:
Make sure the Client ID and Client Secret are correctly configured in UI Bakery.
Validate the Redirect URI settings on both Azure and UI Bakery.
Check Azure logs for authentication errors.