Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit1d1e1f9

Browse files
PhoenixSheppyCopilotDevelopmentCats
authored
docs: add OIDC documentation for Microsoft Entra ID user auth (#20202)
Propose Microsoft Entra ID OIDC Directions for Admin Documentation basedon my personal experience / setup.Propose information on changing access URL in Tutorials -> FAQs---------Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>Co-authored-by: DevCats <chris@dualriver.com>Co-authored-by: DevelopmentCats <christofer@coder.com>
1 parentce04f6c commit1d1e1f9

File tree

3 files changed

+92
-0
lines changed

3 files changed

+92
-0
lines changed
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
#Microsoft Entra ID authentication (OIDC)
2+
3+
This guide shows how to configure Coder to authenticate users with Microsoft Entra ID using OpenID Connect (OIDC)
4+
5+
##Prerequisites
6+
7+
- A Microsoft Azure Entra ID Tenant
8+
- Permission to create Applications in your Azure environment
9+
10+
##Step 1: Create an OAuth App Registration in Microsoft Azure
11+
12+
1. Open Microsoft Azure Portal (https://portal.azure.com) → Microsoft Entra ID → App Registrations → New Registration
13+
2. Name: Name your application appropriately
14+
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"
15+
4. Click on "Register"
16+
5. On the next screen, select: "Certificates and Secrets"
17+
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
18+
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
19+
8. Then, click on the button labeled "Add groups claim" and check "Security groups" and click "Save" at the bottom
20+
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:
21+
-`https://coder.example.com/api/v2/users/oidc/callback`
22+
23+
##Step 2: Configure Coder OIDC for Microsoft Entra ID
24+
25+
Set the following environment variables on your Coder deployment and restart Coder:
26+
27+
```env
28+
CODER_OIDC_ISSUER_URL=https://login.microsoftonline.com/{tenant-id}/v2.0 # Replace {tenant-id} with your Azure tenant ID
29+
CODER_OIDC_CLIENT_ID=<client id, located in "Overview">
30+
CODER_OIDC_CLIENT_SECRET=<client secret, saved from step 6>
31+
# Restrict to one or more email domains (comma-separated)
32+
CODER_OIDC_EMAIL_DOMAIN="example.com"
33+
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.
34+
CODER_OIDC_GROUP_FIELD="groups" # This is for group sync / IdP Sync, a premium feature.
35+
# Optional: customize the login button
36+
CODER_OIDC_SIGN_IN_TEXT="Sign in with Microsoft Entra ID"
37+
CODER_OIDC_ICON_URL=/icon/microsoft.svg
38+
```
39+
40+
>[!NOTE]
41+
>The redirect URI must exactly match what you configured in Microsoft Azure Entra ID
42+
43+
##Enable refresh tokens (recommended)
44+
45+
```env
46+
# Keep standard scopes
47+
CODER_OIDC_SCOPES=openid,profile,email
48+
```
49+
50+
After changing settings, users must log out and back in once to obtain refresh tokens
51+
52+
Learn more in[Configure OIDC refresh tokens](./refresh-tokens.md).
53+
54+
##Troubleshooting
55+
56+
- "invalid redirect_uri": ensure the redirect URI in Azure Entra ID matches`https://<your-coder-host>/api/v2/users/oidc/callback`
57+
- Domain restriction: if users from unexpected domains can log in, verify`CODER_OIDC_EMAIL_DOMAIN`
58+
- Claims: to inspect claims returned by Microsoft, see guidance in the[OIDC overview](./index.md#oidc-claims)
59+
60+
##See also
61+
62+
-[OIDC overview](./index.md)
63+
-[Configure OIDC refresh tokens](./refresh-tokens.md)

‎docs/manifest.json‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -432,6 +432,11 @@
432432
"description":"Configure Google as an OIDC provider",
433433
"path":"./admin/users/oidc-auth/google.md"
434434
},
435+
{
436+
"title":"Microsoft",
437+
"description":"Configure Microsoft Entra ID as an OIDC provider",
438+
"path":"./admin/users/oidc-auth/microsoft.md"
439+
},
435440
{
436441
"title":"Configure OIDC refresh tokens",
437442
"description":"How to configure OIDC refresh tokens",

‎docs/tutorials/faqs.md‎

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -559,3 +559,27 @@ confidential resources to their local machines.
559559
560560
For more advanced security needs, consider adopting an endpoint security
561561
solution.
562+
563+
## How do I change the access URL for my Coder server?
564+
565+
You may want to change the default domain that's used to access coder, i.e.`yourcompany.coder.com` and find yourself unfamiliar with the process.
566+
567+
To change the access URL associated with your server, you can edit any of the following variables:
568+
569+
- CLI using the`--access-url` flag
570+
- YAML using the`accessURL` option
571+
- or ENV using the`CODER_ACCESS_URL` environmental variable.
572+
573+
For example,if you're using an environment file to configure your server, you'll want to edit the file located at`/etc/coder.d/coder.env` and edit the following:
574+
575+
`CODER_ACCESS_URL=https://yourcompany.coder.com` to your new desired URL.
576+
577+
Then save your changes, and reload daemon-ctl using the following command:
578+
579+
`systemctl daemon-reload`
580+
581+
and restart the service using:
582+
583+
`systemctl restart coder`
584+
585+
After coder restarts, your changes should be applied and should reflectin the admin settings.

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp