> For the complete documentation index, see [llms.txt](https://docs.lithnet.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.lithnet.io/ams/v1.0/configuration/setting_up_authentication/setting-up-authentication-with-azure-ad.md).

# Setting up authentication with Azure AD

The following guide will assist you in configuring your application to use Azure Active Directory for authentication.

## Part 1: Configure a new application in Azure AD

1. Log into portal.azure.com with administrative credentials, select `All services` and select `Azure Active Directory`
2. Select `App registrations` and click `New application registration`
3. Enter `Lithnet Access Manager` or another suitable application name, and select `Accounts in this organizational directory only (Lithnet only - Single tenant)` as the supported account type
4. Select `Web` as the application type
5. In the `redirect URI` field, enter the base URL where your Access Manager web app is hosted followed by `/auth/` (eg `https://accessmanager.lithnet.local/auth/`)
6. Click `Register`
7. Take note of the `Application ID` value, this is our OpenID Connect client ID
8. From the left-hand menu, click `Authentication` and then `Properties`. Set the Logout URL to be the same as your base URL, with `/auth/logout` appended to it. (eg `https://accessmanager.lithnet.local/auth/logout`)
9. Save the settings
10. From the `API permissions` page, use the `grant admin consent` if you want to prevent users from being prompted for their consent when logging into the app.
11. From the `Certificates and secrets` page, click `new client secret`, give your secret a name, and then take note of the value provided.

## Part 2: Configure Lithnet Access Manager

1. Open the Lithnet Access Manager Service Configuration Tool
2. Select the `Authentication` page
3. Select `Open ID Connect` as the authentication provider
4. Use the `application id` obtained from the Azure AD setup process as the `client ID` value
5. Specify the `client secret` obtained from the Azure AD setup process.
6. Set the authority as appropriate for your tenant eg for `lithnet.io` it would be `https://login.microsoftonline.com/lithnet.io`

![](https://1984618955-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FAsBzwJDeLC2ny10RHLdI%2Fuploads%2Fgit-blob-3ac537b916bd8d60e12ef04e3991aac1f611f64a%2Fui-page-authentication-oidc-azuread.png?alt=media)

## Part 3: Enable multi-factor authentication

For further security, you can set up a conditional access policy to require multi-factor authentication for the app


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.lithnet.io/ams/v1.0/configuration/setting_up_authentication/setting-up-authentication-with-azure-ad.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
