UserService

POST /api/users/{user}/linkedIdentities

Changed on

CreateLinkedIdentity completes an OAuth flow and links the resulting SSO identity to the authenticated user, who must be the parent.

Request

  • The document declares no server URL.
  • Auth
    none declared

Path parameters

userstring required

The user id.

Request body

parentstring required

Required. The user who owns the linked identity. Must be the caller. Format: users/{user}

identityProviderstring required

Required. The identity provider to link. Format: identity-providers/{idp}

codestring required

Required. The authorization code from the identity provider.

redirectUristring required

Required. The redirect URI used in the OAuth flow.

codeVerifierstring

Optional. The PKCE code verifier used in the OAuth flow.

Response

OK

namestring

Identifier. The resource name of the linked identity. {linked_identity} is the ID of the identity provider. Format: users/{user}/linkedIdentities/{linked_identity}

identityProviderstring

Output only. The resource name of the identity provider. Format: identity-providers/{idp}

externalUidstring

The external user identifier from the identity provider: the subject that signs in as this user. Set by signing in through the provider, or declared in a configuration file for a declared user.

Changes