Setting up Azure AD
Set up an Azure AD login screen for visitors to your docs.
Last updated
Was this helpful?
Set up an Azure AD login screen for visitors to your docs.
Last updated
Was this helpful?
This guide takes your through setting up a protected sign-in screen for your docs. Before going through this guide, make sure you’ve first gone through “”.
To setup your GitBook site with visitor authentication using Azure AD, the process looks as follows:
Start by creating an app registration in your Microsoft Entra ID dashboard. This application registration will allow the GitBook Azure AD integration to request tokens to validate user identity before granting them access to your site.
Sign in to your Microsoft Entra ID admin .
Head to Identity > Applications > App registrations from the left sidebar.
Click on + New registration, and give your registration a name.
Under Supported account types, select “Accounts in this organizational directory only (Default Directory only - Single tenant)”.
Leave the Redirect URI field empty for now—you will need to fill this in later.
Click Register to complete the app registration.
You should then see your new app registration Overview screen. Copy and make note of the Application (client) ID and Directory (tenant) ID.
Click on Add a certificate or secret. You should see the following Certificates & Secrets screen:
Click on + New client secret.
Enter suitable description for the secret and click Add.
Copy and make note of the Value field (not the Secret ID) of the secret you just created.
Once you've created the Azure AD app registration, the next step is to install the Azure AD integration in GitBook and link it with your Azure application using the credentials you generated earlier:
Click on the Integrations button in the top right from your site’s settings.
Click on Visitor Authentication from the categories in the sidebar.
Select the Azure integration.
Click Install on this site.
After installing the integration on your site, you should see the integration's configuration screen:
Copy the URL displayed at the bottom of the dialog.
Head back to the Azure AD app registration you created earlier in the Microsoft Entra ID dashboard.
Browse to Manage > Authentication in the sidebar.
Click + Add a platform and select Web card in the panel that opens.
Paste the GitBook integration URL you copied earlier in the Redirect URI field, and click “Configure”
Head back to Azure integration installation screen in GitBook.
Close the integration dialogs and click on the Settings tab in the site screen.
Browse to Audience and select Visitor authentication (if not already selected).
Select Azure from the dropdown in the Authentication backend section.
Click Update audience.
Head to the site's overview screen and click Publish if the site is not already published.
Your site is now published behind Visitor Authentication using your Azure AD as identity provider.
To test it out, click on Visit. You will be asked to sign in with Azure, which confirms that your site is published behind Visitor Authentication using Azure.
To leverage the Adaptive Content capability in your visitor authentication site, configure the Azure AD app registration to include additional user information in the authentication token as claims.
These claims, represented as key-value pairs, are passed to GitBook and can be used to adapt content dynamically for your site visitors.
Azure AD supports different types and levels of claims, each with its own method of setup:
Standard Claims: Common claims that may be included in tokens but are not always present by default.
Optional Claims: Additional predefined claims that can be enabled for an application.
Custom Claims: Claims sourced from custom user attributes in Azure AD or external systems via a custom claims provider.
For more details on how to include these different types of claims in the tokens generated by your Azure AD app, refer to the following Microsoft Entra documentation guides:
After setting up and configuring the right claims to send to GitBook, head to “Adapting your content” to continue configuring your site.
Navigate to the site where you've and want to use Azure AD as the identity provider.
Enter the Client ID, Tenant ID, and Client Secret values you copied after earlier, and click “Save”.
This feature is still under development and coming soon.
Please sign up for the waitlist at