Skip to content

Commit dcfcc82

Browse files
authored
Instructions to config access token in Azure (#906) (#971)
Cherry-picked from #906
1 parent fd7c3ca commit dcfcc82

File tree

2 files changed

+73
-3
lines changed

2 files changed

+73
-3
lines changed

modules/ROOT/images/sso-configuration-tutorials/azure-id.svg

Lines changed: 19 additions & 0 deletions
Loading

modules/ROOT/pages/tutorial/tutorial-sso-configuration.adoc

Lines changed: 54 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -128,9 +128,60 @@ image::sso-configuration-tutorials/okta-sign-on-tab.svg[title="Okta's sign-on ta
128128

129129
== Azure Active Directory (AAD)
130130

131+
=== Access token
132+
133+
This example shows how to configure AAD for authentication and authorization using an access token.
134+
135+
. Set parameters to be `access_token`:
136+
+
137+
[source, properties]
138+
----
139+
dbms.security.oidc.azure.config=principal=unique_name;code_challenge_method=S256;token_type_principal=access_token;token_type_authentication=access_token
140+
----
141+
142+
. Add the following parameter:
143+
+
144+
[source, properties]
145+
----
146+
dbms.security.oidc.azure.token_endpoint=https://login.microsoftonline.com/54e85725-ed2a-49a4-a19e-11c8d29f9a0f/oauth2/v2.0/token
147+
----
148+
+
149+
[NOTE]
150+
====
151+
The GUID is the directory (tenant) ID.
152+
You can find it on the app registration page:
153+
154+
image::sso-configuration-tutorials/azure-id.svg[]
155+
====
156+
157+
. Include the issuer:
158+
+
159+
[source, properties]
160+
----
161+
dbms.security.oidc.azure.issuer=https://sts.windows.net/54e85725-ed2a-49a4-a19e-11c8d29f9a0f/
162+
----
163+
+
164+
[NOTE]
165+
====
166+
As previously mentioned, the GUID here is also the directory (tenant) ID.
167+
Make sure you add the trailing slash (`/`) at the end or this operation might fail.
168+
====
169+
170+
. Go to the "Expose an API" tab and click "Add a Scope" to include the following statement:
171+
+
172+
[source, properties]
173+
----
174+
dbms.security.oidc.azure.params=client_id=4376dc8b-b5af-424f-9ada-c1c1b2d416b9;response_type=code;scope=openid profile email api://4376dc8b-b5af-424f-9ada-c1c1b2d416b9/access-token
175+
----
176+
177+
. Add the value in the scope column to the scopes in the configuration.
178+
Note that the audience parameter for access tokens are typically set with` api://` at the front.
179+
180+
=== ID token
181+
131182
This example shows how to configure AAD for authentication and authorization using ID tokens.
132183

133-
=== Register the application
184+
==== Register the application
134185

135186
. Log in to the https://portal.azure.com/#home[Azure portal].
136187
. Navigate to *Azure Active Directory > Overview*.
@@ -141,7 +192,7 @@ The redirect URI `http://localhost:7474/browser/?idp_id=azure&auth_flow_step=red
141192
. Click *Register*.
142193

143194

144-
=== Configure Neo4j
195+
==== Configure Neo4j
145196
. After the successful app creation, on the app's *Overview* page, find the Application (client) ID value. Use it to configure the following properties in the _neo4j.conf_ file.
146197
+
147198
[source, properties]
@@ -183,7 +234,7 @@ For details, see https://learn.microsoft.com/en-us/azure/active-directory/develo
183234
dbms.security.oidc.azure.claims.username=sub
184235
----
185236

186-
=== Map Azure groups to Neo4j roles
237+
==== Map Azure groups to Neo4j roles
187238

188239
Decide whether you want to use Azure AD Groups directly or Azure App Roles.
189240

0 commit comments

Comments
 (0)