- Notifications
You must be signed in to change notification settings - Fork1k
docs: add docs for Microsoft Entra ID user auth OIDC docs and on changing access URL#20202
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Open
PhoenixSheppy wants to merge16 commits intocoder:mainChoose a base branch fromPhoenixSheppy:main
base:main
Could not load branches
Branch not found:{{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline, and old review comments may become outdated.
+91 −0
Open
Changes fromall commits
Commits
Show all changes
16 commits Select commitHold shift + click to select a range
92cc645
Add Microsoft Entra ID OIDC Directions
PhoenixSheppy5a4280d
Missed a few things, whoops.
PhoenixSheppy6fa26dc
Update docs/admin/users/oidc-auth/microsoft.md
PhoenixSheppy6c9dc1f
Update docs/admin/users/oidc-auth/microsoft.md
PhoenixSheppy3edc9de
Update docs/admin/users/oidc-auth/microsoft.md
PhoenixSheppy4602c69
add microsoft.md to manifest
PhoenixSheppy2572b5b
Merge branch 'main' into main
PhoenixSheppy3c5f2a5
Merge branch 'main' into main
PhoenixSheppy49a855d
docs: provide information on changing access URL in FAQs.
PhoenixSheppy46925d3
Merge branch 'main' into main
PhoenixSheppy71f474b
Merge branch 'main' into main
PhoenixSheppy3086f79
Merge branch 'main' into main
PhoenixSheppye54ed97
Merge branch 'main' into main
PhoenixSheppy77cf4f0
Merge branch 'main' into main
PhoenixSheppyf89767f
Merge branch 'main' into main
PhoenixSheppy3cca5f0
Merge branch 'main' into main
PhoenixSheppyFile filter
Filter by extension
Conversations
Failed to load comments.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Jump to file
Failed to load files.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
There are no files selected for viewing
62 changes: 62 additions & 0 deletionsdocs/admin/users/oidc-auth/microsoft.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
# Microsoft Entra ID authentication (OIDC) | ||
This guide shows how to configure Coder to authenticate users with Microsoft Entra ID using OpenID Connect (OIDC). | ||
## Prerequisites | ||
- A Microsoft Azure Entra ID Tenant | ||
- Permission to create Applications in your Azure environment | ||
## Step 1: Create an OAuth App Registration in Microsoft Azure | ||
1. Open Microsoft Azure Portal (https://portal.azure.com) → Microsoft Entra ID → App Registrations → New Registration. | ||
2. Name: Name your application appropriately | ||
3. Supported Account Types: Choose the appropriate radio button according to your needs. Most organizations will want to use the first one labeled "Accounts in this organizational directory only" | ||
4. Click on "Register" | ||
5. On the next screen, select: "Certificates and Secrets" | ||
6. Click on "New Client Secret" and under description, enter an appropriate description. Then set an expiry and hit "Add" once it's created, copy the value and save it somewhere secure for the next step. | ||
7. Next, click on the tab labeled "Token Configuration", then click "Add optional claim" and select the "ID" radio button, and finally check "upn" and hit "add" at the bottom. | ||
8. Then, click on the button labeled "Add groups claim" and check "Security groups" and click "Save" at the bottom. | ||
9. Now, click on the tab labeled "Authentication" and click on "Add a platform", select "Web" and for the redirect URI enter your Coder callback URL, and then hit "Configure" at the bottom: | ||
- `https://coder.example.com/api/v2/users/oidc/callback` | ||
## Step 2: Configure Coder OIDC for Microsoft Entra ID | ||
Set the following environment variables on your Coder deployment and restart Coder: | ||
```env | ||
CODER_OIDC_ISSUER_URL=https://login.microsoftonline.com/{tenant-id}/v2.0 # Replace {tenant-id} with your Azure tenant ID | ||
CODER_OIDC_CLIENT_ID=<client id, located in "Overview"> | ||
CODER_OIDC_CLIENT_SECRET=<client secret, saved from step 6> | ||
# Restrict to one or more email domains (comma-separated) | ||
CODER_OIDC_EMAIL_DOMAIN="example.com" | ||
CODER_OIDC_EMAIL_FIELD="upn" # This is set because EntraID typically uses .onmicrosoft.com domains by default, this should pull the user's username@domain email. | ||
# Optional: customize the login button | ||
CODER_OIDC_SIGN_IN_TEXT="Sign in with Microsoft Entra ID" | ||
CODER_OIDC_ICON_URL=/icon/microsoft.svg | ||
``` | ||
> [!NOTE] | ||
> The redirect URI must exactly match what you configured in Microsoft Azure Entra ID. | ||
## Enable refresh tokens (recommended) | ||
```env | ||
# Keep standard scopes | ||
CODER_OIDC_SCOPES=openid,profile,email | ||
``` | ||
After changing settings, users must log out and back in once to obtain refresh tokens. | ||
Learn more in [Configure OIDC refresh tokens](./refresh-tokens.md). | ||
## Troubleshooting | ||
- "invalid redirect_uri": ensure the redirect URI in Azure Entra ID matches `https://<your-coder-host>/api/v2/users/oidc/callback`. | ||
- Domain restriction: if users from unexpected domains can log in, verify `CODER_OIDC_EMAIL_DOMAIN`. | ||
- Claims: to inspect claims returned by Microsoft, see guidance in the [OIDC overview](./index.md#oidc-claims). | ||
## See also | ||
- [OIDC overview](./index.md) | ||
- [Configure OIDC refresh tokens](./refresh-tokens.md) |
5 changes: 5 additions & 0 deletionsdocs/manifest.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletionsdocs/tutorials/faqs.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.