Skip to main content

Get organization of a user

The endpoint provides detailed information of an organization of a user.

HTTP request

GET https://$instanceId.id.nevis.cloud/nevis/api/v1/users/$userId/organization

Parameters

ParameterInTypeRequired / OptionalDescription
instanceIdpathstringrequiredThe ID of your Identity Cloud instance
userIdpathstringrequiredThe ID of the user.

Example request

userId=your-user-id-123
curl "https://$instanceId.id.nevis.cloud/nevis/api/v1/users/$userId/organization" \
--header "Authorization: Bearer $accessKey"

HTTP response

On success

HTTP/1.1 200 is returned if the organization is found for the user.

ParameterTypeDescription
versionintegerThe version of the organization data, used for optimistic locking
createdstringThe creation date of the organization in ISO 8061 timestamp format YYYY-MM-DDThh:mm:ssZ
lastModifiedstringThe last modification date of the organization modification in ISO 8061 timestamp format YYYY-MM-DDThh:mm:ssZ
organizationIdstringThe identifier of the organization
domainstringThe domain of the organization
namestringThe name of the organization
organizationStatestringThe state of the organization Values: active, blocked

Example response

{
"organizationId": "4e71988b-7302-4133-adf8-887499357ad4",
"created": "2023-06-08T10:17:29Z",
"domain": "your-organization.org",
"name": "Your Organization",
"organizationState": "active",
"lastModified": "2023-06-08T10:17:29Z",
"version": 0
}

On missing user

HTTP/1.1 404 is returned if the user with the given userId is not found.

On user not assigned to an organization

HTTP/1.1 404 is returned if the user with the given userId is not assigned to an organization.

On failure

HTTP/1.1 401 is returned if the authorization fails due to an invalid access key.

HTTP/1.1 500 is returned if an unexpected error occurrs.