SecurityAgent / Client / initiate_provider_registration

initiate_provider_registration

SecurityAgent.Client.initiate_provider_registration(**kwargs)

Initiates the OAuth registration flow with a third-party provider. Returns a redirect URL and CSRF state token for completing the authorization.

See also: AWS API Documentation

Request Syntax

response = client.initiate_provider_registration(
    provider='GITHUB'|'GITLAB'|'BITBUCKET'|'CONFLUENCE'|'AZURE_DEVOPS',
    targetUrl='string',
    organizationName='string',
    clientId='string',
    clientSecret='string'
)
Parameters:
  • provider (string) –

    [REQUIRED]

    The provider to initiate registration with.

  • targetUrl (string) – The HTTPS URL of a self-managed provider instance. Omit for SaaS providers.

  • organizationName (string) – The name of the organization to connect.

  • clientId (string) – The client ID of the OAuth application registered on your self-managed provider instance.

  • clientSecret (string) – The client secret of the OAuth application registered on your self-managed provider instance.

Return type:

dict

Returns:

Response Syntax

{
    'redirectTo': 'string',
    'csrfState': 'string'
}

Response Structure

  • (dict) –

    • redirectTo (string) –

      The URL to redirect the user to for completing the OAuth authorization.

    • csrfState (string) –

      The CSRF state token to use when completing the OAuth flow.

Exceptions

  • SecurityAgent.Client.exceptions.ResourceNotFoundException

  • SecurityAgent.Client.exceptions.InternalServerException

  • SecurityAgent.Client.exceptions.ValidationException

  • SecurityAgent.Client.exceptions.ConflictException

  • SecurityAgent.Client.exceptions.ThrottlingException

  • SecurityAgent.Client.exceptions.AccessDeniedException