Search documentation
karat

+

K

User Documentation ↗
Version 2.0

Preregister User

POST/api/v2/admin/enrollments/{enrollmentRid}/authenticationProviders/{authenticationProviderRid}/preregisterUser
Warning

This endpoint is in preview and may be modified or removed at any time. To use this endpoint, add preview=true to the request query parameters.

Register a User with a given username before they log in to the platform for the first time through this Authentication Provider. Preregistered users can be assigned to groups and roles prior to first login.

Path parameters

enrollmentRid
string
authenticationProviderRid
string

Query parameters

preview
boolean
optional

Enables the use of preview functionality.

Request body

PreregisterUserRequest
object
Hide child attributes

Hide child attributes

username
string

The new user's username. This must match one of the provider's supported username patterns.

organization
string

The RID of the user's primary Organization. This may be changed when the user logs in for the first time depending on any configured Organization assignment rules.

givenName
string
optional
familyName
string
optional
email
string
optional
attributes
map<AttributeName, AttributeValues>
optional
Show child attributes

Show child attributes

Response body

PrincipalId
string

The ID of a Foundry Group or User.

Examples

Request

Copied!
1 2 3 4 5 curl -X POST \ -H "Content-type: application/json" \ -H "Authorization: Bearer $TOKEN" \ "https://$HOSTNAME/api/v2/admin/enrollments/ri.control-panel.main.customer.466f812b-f974-4478-9d4f-90402cd3def6/authenticationProviders/ri.control-panel.main.saml.3faf689c-eaa1-4137-851f-81d58afe4c86/preregisterUser?preview=true" \ -d '{"organization":"ri.multipass..organization.c30ee6ad-b5e4-4afe-a74f-fe4a289f2faa","givenName":"John","familyName":"Smith","attributes":{"multipass:givenName":["John"],"multipass:familyName":["Smith"],"multipass:email:primary":["jsmith@example.com"],"multipass:realm":["eab0a251-ca1a-4a84-a482-200edfb8026f"],"multipass:organization-rid":["ri.multipass..organization.c30ee6ad-b5e4-4afe-a74f-fe4a289f2faa"],"department":["Finance"],"jobTitle":["Accountant"]},"email":"jsmith@example.com","username":"jsmith"}'

Response

Copied!
1 f05f8da4-b84c-4fca-9c77-8af0b13d11de

Error responses

Error Name
PreregisterUserPermissionDeniedError CodePERMISSION_DENIED
Status Code403
DescriptionCould not preregisterUser the AuthenticationProvider.
ParametersenrollmentRid, authenticationProviderRid
AuthenticationProviderNotFoundError CodeNOT_FOUND
Status Code404
DescriptionThe given AuthenticationProvider could not be found.
ParametersenrollmentRid, authenticationProviderRid