Authorization
header, an access token must be used instead.
Authorization
header with update:users
as the granted permission, then you can send as the request’s body either the user_id
or the ID Token of the secondary account.
Authorization
header with update:current_user_metadata
as the granted permission, then you can only send the ID token of the secondary account in the request’s body.
RS256
(you can set this value at Dashboard > Clients > Client Settings > Advanced Settings > OAuth.aud
of the ID Token, must identify the client and be the same value with the azp
claim of the access token.Authorization
header. You must use an access token instead.
Use Case | Status |
---|---|
Use the Management API POST /api/v2/users//identities endpoint and send the primary account’s ID token in the Authorization header. | Affected |
Use the Management API POST /api/v2/users//identities endpoint and send an access token (with scope update:users ) in the authorization header, and the secondary account’s user_id in the payload. | Not affected |
Use the Management API POST /api/v2/users//identities endpoint and send an access token (with scope update:current_user_identities ) in the Authorization header, and the secondary account’s user_id in the payload. | Affected |
Use the Management API POST /api/v2/users//identities endpoint and send an access token in the Authorization header and the secondary account’s ID token in the payload. | New use case |
Use the auth0.js library and the primary account’s ID token to instantiate auth0.Management . | Affected |
Use the auth0.js library and an access token (with scope update:users ) to instantiate auth0.Management . | Not affected |
Use the auth0.js library and an access token (with scope update:current_user_identities ) to instantiate auth0.Management . | Affected |
Use the Management API DELETE /api/v2/users//identities// endpoint and send the primary account’s ID token in the Authorization header. | Affected |
Use the Management API DELETE /api/v2/users//identities// endpoint and send an access token in the Authorization header. | Not affected |
update:current_user_identities
scope, and provide the ID token of the secondary account in the payload (link_with
). This ID token must be obtained through an /OIDC-conformant flow.update:users
scope and provide the user_id
of the secondary account in the payload.update:current_user_identities
scope) to authenticate with the Management API and use the Link a User Account endpoint.
Now you must get an access token (containing the update:current_user_identities
scope) and use that to authenticate with the API and use the Link a User Account endpoint. The payload must be the ID token of the secondary user.
update:current_user_identities
scope as shown in the following example. The example uses the implicit flow, however, you can get access tokens for any application type.
audience
to https://{yourDomain}/api/v2/
.
scope
${scope}
.
response_type
to id_token token
so Auth0 will send both an ID token and an access token.
If we decode the access token and review its contents we can see the following:
aud
is set to your tenant’s API URI, the scope
to ${scope}
, and the sub
to the user ID of the logged-in user.
RS256.
aud
claim in the secondary account’s ID token must identify the client, and hold the same value with the azp
claim of the access token used to make the request.Bearer
token. The response also remains the same.
auth0.Management
and use it to link accounts.
update:current_user_identities
scope, then use this token to instantiate auth0.Management
. The final call to linkUser
remains the same.
responseType: `token id_token`
).audience: `https://YOUR_DOMAIN/api/v2/`
).scope: `update:current_user_identities`
).update:users
scope, and send the secondary account’s user_id
and provider
in the request, then you don’t have to make any changes.
However, this new method introduces an alternative to this. You still use an access token that contains the update:users
scope to authenticate with the API, but in the request’s payload you can send the secondary’s account ID token (instead of user_id
and provider
).
RS256
.aud
claim in the secondary account’s ID token must identify the client, and hold the same value with the azp
claim of the access token used to make the request.update:current_user_identities
scope.
audience
to https://{yourDomain}/api/v2/
.
scope
${scope}
.
response_type
to id_token token
so Auth0 will send both an ID token and an access token.
If we decode the access token and review its contents we can see the following:
aud
is set to your tenant’s API URI, the scope
to update:current_user_identities
, and the sub
to the user ID of the logged in user.
Authorization
header.
update:current_user_identities
in the Authorization header and include the secondary account’s user_id
in the payload. No other use cases are impacted.