Skip to content
This repository was archived by the owner on Apr 26, 2024. It is now read-only.

Commit 6c9ab61

Browse files
authored
Added basic instructions for Azure AD to OpenId documentation (#8582)
Signed-off-by: Peter Krantz [email protected]
1 parent 49d72de commit 6c9ab61

File tree

2 files changed

+27
-0
lines changed

2 files changed

+27
-0
lines changed

changelog.d/8582.doc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Instructions for Azure AD in the OpenID Connect documentation. Contributed by peterk.

docs/openid.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,32 @@ specific providers.
5252

5353
Here are a few configs for providers that should work with Synapse.
5454

55+
### Microsoft Azure Active Directory
56+
Azure AD can act as an OpenID Connect Provider. Register a new application under
57+
*App registrations* in the Azure AD management console. The RedirectURI for your
58+
application should point to your matrix server: `[synapse public baseurl]/_synapse/oidc/callback`
59+
60+
Go to *Certificates & secrets* and register a new client secret. Make note of your
61+
Directory (tenant) ID as it will be used in the Azure links.
62+
Edit your Synapse config file and change the `oidc_config` section:
63+
64+
```yaml
65+
oidc_config:
66+
enabled: true
67+
issuer: "https://login.microsoftonline.com/<tenant id>/v2.0"
68+
client_id: "<client id>"
69+
client_secret: "<client secret>"
70+
scopes: ["openid", "profile"]
71+
authorization_endpoint: "https://login.microsoftonline.com/<tenant id>/oauth2/v2.0/authorize"
72+
token_endpoint: "https://login.microsoftonline.com/<tenant id>/oauth2/v2.0/token"
73+
userinfo_endpoint: "https://graph.microsoft.com/oidc/userinfo"
74+
75+
user_mapping_provider:
76+
config:
77+
localpart_template: "{{ user.preferred_username.split('@')[0] }}"
78+
display_name_template: "{{ user.name }}"
79+
```
80+
5581
### [Dex][dex-idp]
5682
5783
[Dex][dex-idp] is a simple, open-source, certified OpenID Connect Provider.

0 commit comments

Comments
 (0)