The State of Docs Report 2025 is live! Dive in and see why docs matter more than ever:
Read the report
LogoLogo
ProductPricingLog inSign up
  • Documentation
  • Developers
  • Guides
  • Changelog
  • Help Center
  • Getting Started
    • GitBook Documentation
    • Quickstart
    • Importing content
    • GitHub & GitLab Sync
      • Enabling GitHub Sync
      • Enabling GitLab Sync
      • Content configuration
      • GitHub pull request preview
      • Commit messages & Autolink
      • Monorepos
      • Troubleshooting
  • Creating Content
    • Formatting your content
      • Inline content
      • Markdown
    • Content structure
      • Spaces
      • Pages
      • Collections
    • Blocks
      • Paragraphs
      • Headings
      • Unordered lists
      • Ordered lists
      • Task lists
      • Hints
      • Quotes
      • Code blocks
      • Files
      • Images
      • Embedded URLs
      • Tables
      • Cards
      • Tabs
      • Expandable
      • Stepper
      • Drawings
      • Math & TeX
      • Page links
    • Reusable content
    • Broken links
    • Searching content
      • Search & Quick find
      • GitBook AI
    • Writing with GitBook AI
    • Version control
  • API References
    • OpenAPI
      • Add an OpenAPI specification
      • Insert API reference in your docs
    • Guides
      • Structuring your API reference
      • Adding custom code samples
      • Managing API operations
      • Describing enums
      • Integrating with CI/CD
  • Extensions reference
  • Publishing Documentation
    • Publish a docs site
      • Public publishing
      • Private publishing with share links
    • Site structure
      • Content variants
      • Site sections
    • Site customization
      • Icons, colors, and themes
      • Layout and structure
      • Extra configuration
    • Set a custom domain
    • Setting a custom subdirectory
      • Configuring a subdirectory with Cloudflare
      • Configuring a subdirectory with Vercel
    • Site settings
    • Site insights
    • Site redirects
    • Visitor authentication
      • Enabling visitor authentication
      • Setting up Auth0
      • Setting up Azure AD
      • Setting up AWS Cognito
      • Setting up Okta
      • Setting up OIDC
      • Setting up a custom backend
  • LLM-ready docs
  • Collaboration
    • Live edits
    • Change requests
    • PDF export
    • Inviting your team
    • Comments
    • Notifications
  • Integrations
    • Install and manage integrations
    • GitHub Copilot
  • Account management
    • Plans
      • Legacy pricing
      • Sponsored site plan
      • Non-profit plan
      • Billing policy
    • Subscription cancellations
    • Personal settings
    • Organization settings
    • Member management
      • Invite or remove members
      • Roles
      • Teams
      • Permissions and inheritance
    • SSO & SAML
      • SSO Members vs non-SSO
  • Resources
    • GitBook UI
    • Keyboard shortcuts
    • Glossary
Powered by GitBook
LogoLogo

Resources

  • Showcase
  • Enterprise
  • Status

Company

  • Careers
  • Blog
  • Community

Policies

  • Subprocessors
  • Terms of Service
On this page
  • Overview
  • 1. Create an app registration in Azure AD
  • 2. Install and configure the Azure AD integration
  • 3. Configure Azure AD for Adaptive content (optional)

Was this helpful?

Edit on GitHub
  1. Publishing Documentation
  2. Visitor authentication

Setting up Azure AD

Set up an Azure AD login screen for visitors to your docs.

Last updated 28 days ago

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 “”.

There is a known limitation with the Azure integration where heading URL fragments will be removed upon authentication. The user will still land on the correct page, but will be taken to the top of the page instead of the heading in the URL. Once a user is authenticated this behavior will no longer occur during a session and the user would be directed to the correct heading.

This is due to a security measure put in place by Microsoft.

Overview

To setup your GitBook site with visitor authentication using Azure AD, the process looks as follows:

1

Create an Azure AD application registration in your Microsoft Entra ID admin dashboard.

2

Install the Azure AD integration and add the required configuration to your GitBook site.

3

Configure your Azure AD to work with Adaptive content in GitBook.

1. Create an app registration in Azure AD

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.

  1. Sign in to your Microsoft Entra ID admin .

  2. Head to Identity > Applications > App registrations from the left sidebar.

  3. Click on + New registration, and give your registration a name.

  4. Under Supported account types, select “Accounts in this organizational directory only (Default Directory only - Single tenant)”.

  5. Leave the Redirect URI field empty for now—you will need to fill this in later.

  6. Click Register to complete the app registration.

  7. You should then see your new app registration Overview screen. Copy and make note of the Application (client) ID and Directory (tenant) ID.

  8. Click on Add a certificate or secret. You should see the following Certificates & Secrets screen:

  9. Click on + New client secret.

  10. Enter suitable description for the secret and click Add.

  11. Copy and make note of the Value field (not the Secret ID) of the secret you just created.

2. Install and configure the Azure AD integration

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:

  1. Click on the Integrations button in the top right from your site’s settings.

  2. Click on Visitor Authentication from the categories in the sidebar.

  3. Select the Azure integration.

  4. Click Install on this site.

  5. After installing the integration on your site, you should see the integration's configuration screen:

  6. Copy the URL displayed at the bottom of the dialog.

  7. Head back to the Azure AD app registration you created earlier in the Microsoft Entra ID dashboard.

  8. Browse to Manage > Authentication in the sidebar.

  9. Click + Add a platform and select Web card in the panel that opens.

  10. Paste the GitBook integration URL you copied earlier in the Redirect URI field, and click “Configure”

  11. Head back to Azure integration installation screen in GitBook.

  12. Close the integration dialogs and click on the Settings tab in the site screen.

  13. Browse to Audience and select Visitor authentication (if not already selected).

  14. Select Azure from the dropdown in the Authentication backend section.

  15. Click Update audience.

  16. 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.

Upon accessing the published content URL and after logging in with your Azure credentials, you may see a screen telling you that you need to "Request approval" from your admin. Your admin can grant this request by accessing the published content URL, logging in, and granting approval on behalf of the organization.

3. Configure Azure AD for Adaptive content (optional)

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.

    Azure AD keeps token sizes optimized for performance. As a result, many claims are not included in the token by default and must be explicitly requested by the application. To ensure claims like email , groups or roles are included, they must be explicitly requested as optional claims.

  • 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”.

User Attributes
Optional Claims
Custom Claims
creating the Azure AD app registration
Enabling visitor authentication
dashboard
Create an app registration in Azure AD
Install and configure the Azure AD integration on your site
Configure Azure AD for adaptive content (optional)
enabled Visitor Authentication
Register an app for the GitBook VA integration.
Overview of the newly created app registration.
Add a certificate or secret.

This feature is still under development and coming soon.

Please sign up for the waitlist at

https://www.gitbook.com/