Skip to main content

Start flow with an identity provider

Start a flow with an identity provider, for external login, registration or linking

Request Body required
    idpId string

    Possible values: non-empty and <= 200 characters

    ID for existing identity provider

    urls object
    successUrl string

    Possible values: non-empty and <= 200 characters

    URL on which the user will be redirected after a successful login

    failureUrl string

    Possible values: non-empty and <= 200 characters

    URL on which the user will be redirected after a failed login

    ldap object
    username string

    Possible values: non-empty and <= 200 characters

    Username used to login through LDAP

    password string

    Possible values: non-empty and <= 200 characters

    Password used to login through LDAP

Responses

OK


Schema
    details object
    sequence uint64

    on read: the sequence of the last event reduced by the projection

    on manipulation: the timestamp of the event(s) added by the manipulation

    changeDate date-time

    on read: the timestamp of the last event reduced by the projection

    on manipulation: the timestamp of the event(s) added by the manipulation

    resourceOwner resource_owner is the organization or instance_id an object belongs to
    authUrl string

    URL to which the client should redirect

    idpIntent object

    IDP Intent information

    idpIntentId string

    Possible values: non-empty and <= 200 characters

    ID of the IDP intent

    idpIntentToken string

    Possible values: non-empty and <= 200 characters

    token of the IDP intent

    userId string

    Possible values: <= 200 characters

    ID of the ZITADEL user if external user already linked

    postForm byte

    POST call information

POST /v2beta/idp_intents

Authorization

name: OAuth2type: oauth2scopes: openid,urn:zitadel:iam:org:project:id:zitadel:audflows: {
  "authorizationCode": {
    "authorizationUrl": "$CUSTOM-DOMAIN/oauth/v2/authorize",
    "tokenUrl": "$CUSTOM-DOMAIN/oauth/v2/token",
    "scopes": {
      "openid": "openid",
      "urn:zitadel:iam:org:project:id:zitadel:aud": "urn:zitadel:iam:org:project:id:zitadel:aud"
    }
  }
}

Request

Base URL
https://$CUSTOM-DOMAIN
Bearer Token
Content-Type
Body required
{
"idpId": "163840776835432705",
"urls": {
"successUrl": "https://custom.com/login/idp/success",
"failureUrl": "https://custom.com/login/idp/fail"
},
"ldap": {
"username": "username",
"password": "Password1!"
}
}
Accept
curl / cURL
curl -L -X POST 'https://$CUSTOM-DOMAIN/v2beta/idp_intents' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <TOKEN>' \
--data-raw '{
"idpId": "163840776835432705",
"urls": {
"successUrl": "https://custom.com/login/idp/success",
"failureUrl": "https://custom.com/login/idp/fail"
},
"ldap": {
"username": "username",
"password": "Password1!"
}
}'