-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathAuth0ClientCred.http
36 lines (28 loc) · 1.3 KB
/
Auth0ClientCred.http
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# Workflow for Managed Identity with Auth0:
# https://learn.microsoft.com/en-us/entra/identity-platform/v2-oauth2-client-creds-grant-flow#third-case-access-token-request-with-a-federated-credential
#
# Configure Auth0 at:
# api representation: https://manage.auth0.com/dashboard/us/dev-t6czzh704lcitkvd/apis/67a79ab8e74055fae50c242d/settings
# application representation: https://manage.auth0.com/dashboard/us/dev-t6czzh704lcitkvd/applications/332JPmpa889DtITmbIPUNop6fX8hrpPS/settings
@Auth0ClientId = 332JPmpa889DtITmbIPUNop6fX8hrpPS
@Auth0ClientSecret = yoursecret
# @name loginAuth0
POST /oauth/token HTTP/1.1
Host: dev-t6czzh704lcitkvd.us.auth0.com:443
Content-Type: application/x-www-form-urlencoded
grant_type=client_credentials
&client_id={{Auth0ClientId}}
&client_secret={{Auth0ClientSecret}}
&audience=azure
###
@Auth0Token = {{loginAuth0.response.body.$.access_token}}
# @name federatedAuth0
POST /b81eb003-1c5c-45fd-848f-90d9d3f8d016/oauth2/v2.0/token HTTP/1.1
Host: login.microsoftonline.com:443
Content-Type: application/x-www-form-urlencoded
scope=api://bank-nl/.default
&client_id=11764a77-04a2-461a-a2a4-f6b3252d6dd7
&client_assertion_type=urn%3Aietf%3Aparams%3Aoauth%3Aclient-assertion-type%3Ajwt-bearer
&client_assertion={{Auth0Token}}
&grant_type=client_credentials
###