User account associations API
Base URL: https://api.asgardeo.io/t/<ORGANIZATION_NAME>/api/users/v1
The User Account Association API (version v1).
Download the OpenAPI definition (YAML)
Security schemes
OAuth2: oauth2
authorizationCode flow, token URL https://api.asgardeo.io/t/{organization-name}/oauth2/token, authorization URL https://api.asgardeo.io/t/{organization-name}/oauth2/authorize
admin
Operations available for privileged users, to be invoked on behalf of another user.
Get user's associations
GET /{user-id}/associations
This API is used to retrieve the associations of the user.
Scope(Permission) required: internal_user_association_view
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
user-id | path | string | Yes | user id |
Responses
| Code | Description | Schema |
|---|---|---|
200 | Successful operation | array of User |
204 | No content | |
401 | Unauthorized request | |
403 | Resource Forbidden | |
404 | Not Found | Error |
500 | Server Error | Error |
Delete user's all user associations
DEL /{user-id}/associations
This API is used to delete all associations of the user.
Scope(Permission) required: internal_user_association_delete
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
user-id | path | string | Yes |
Responses
| Code | Description | Schema |
|---|---|---|
204 | No content | |
401 | Unauthorized request | |
403 | Resource Forbidden | |
404 | Not Found | Error |
500 | Server Error | Error |
Get user's federated associations
GET /{user-id}/federated-associations
This API is used to retrieve the federated associations of the user.
Scope(Permission) required: internal_user_association_view
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
user-id | path | string | Yes | user id |
Responses
| Code | Description | Schema |
|---|---|---|
200 | Successful operation | array of FederatedAssociation |
204 | No content | |
401 | Unauthorized request | |
403 | Resource Forbidden | |
404 | Not Found | Error |
500 | Server Error | Error |
Create federated user association
POST /{user-id}/federated-associations
This API allows administrators to explicitly associate a local user with a federated identity.
Scope(Permission) required: internal_user_association_create
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
user-id | path | any | Yes | user id |
Request body (required): application/json
User details to be associated.
Schema: FederatedAssociationRequest
2 properties
| Name | Type | Required | Description |
|---|---|---|---|
idp | string | Name of the IdP | |
federatedUserId | string | User identifier in the federated IdP |
Responses
| Code | Description | Schema |
|---|---|---|
201 | Successfully created | |
400 | Bad Request | |
401 | Unauthorized | |
403 | Resource Forbidden | |
500 | Server Error |
Delete user's all user-federated associations
DEL /{user-id}/federated-associations
This API is used to delete all federated associations of the user.
Scope(Permission) required: internal_user_association_delete
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
user-id | path | string | Yes |
Responses
| Code | Description | Schema |
|---|---|---|
204 | No content | |
401 | Unauthorized request | |
403 | Resource Forbidden | |
404 | Not Found | Error |
500 | Server Error | Error |
Delete the user's federated association
DEL /{user-id}/federated-associations/{id}
This API is used to delete a federated association of the user.
Scope(Permission) required: internal_user_association_delete
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
user-id | path | string | Yes | |
id | path | string | Yes |
Responses
| Code | Description | Schema |
|---|---|---|
204 | No content | |
401 | Unauthorized request | |
403 | Resource Forbidden | |
404 | Not Found | Error |
500 | Server Error | Error |
Create and Delete users associations in bulk
POST /federated-associations/bulk
This API is used to create and delete users association in bulk.
Maximum number of supported operations in a single request is 1000 by default.
It can be configured using a server level configuration.
Scope required:
* internal_user_fed_association_bulk
Request body: application/json
Schema: BulkFederatedAssociationRequest
2 properties
| Name | Type | Required | Description |
|---|---|---|---|
failOnErrors | integer | This represents whether the API should stop processing the operations if any of them fail. The subsequent operations after the fail count is reached will not be processed. If set to 0 or not set, the API will continue processing the operations even if some of them fail. | |
operations | array of BulkFederatedAssociationOperation |
Responses
| Code | Description | Schema |
|---|---|---|
200 | Success | |
400 | Bad Request | |
401 | Unauthorized | |
403 | Forbidden | |
500 | Internal Server Error |
Schemas
Error
Type: object
4 properties
| Name | Type | Required | Description |
|---|---|---|---|
code | string | Yes | |
message | string | Yes | |
description | string | ||
traceId | string |
User
Type: object
7 properties
| Name | Type | Required | Description |
|---|---|---|---|
userId | string | ||
username | string | ||
userStoreDomain | string | ||
tenantDomain | string | ||
firstName | string | ||
lastName | string | ||
email | string |
FederatedAssociation
Type: object
3 properties
| Name | Type | Required | Description |
|---|---|---|---|
id | string | ||
idp | Idp | ||
federatedUserId | string |
Idp
Type: object
4 properties
| Name | Type | Required | Description |
|---|---|---|---|
id | string | ||
name | string | ||
displayName | string | ||
imageUrl | string |
AssociationUserRequest
Type: object
3 properties
| Name | Type | Required | Description |
|---|---|---|---|
userId | string | ||
password | string | ||
properties | array of Property |
FederatedAssociationRequest
Type: object
2 properties
| Name | Type | Required | Description |
|---|---|---|---|
idp | string | Name of the IdP | |
federatedUserId | string | User identifier in the federated IdP |
BulkFederatedAssociationRequest
Type: object
2 properties
| Name | Type | Required | Description |
|---|---|---|---|
failOnErrors | integer | This represents whether the API should stop processing the operations if any of them fail. The subsequent operations after the fail count is reached will not be processed. If set to 0 or not set, the API will continue processing the operations even if some of them fail. | |
operations | array of BulkFederatedAssociationOperation |
BulkFederatedAssociationOperation
Type: object
4 properties
| Name | Type | Required | Description |
|---|---|---|---|
method | string | Yes | HTTP method to be used for the operation. Supported methods are POST and, DELETE. These values If the method is not specified, the operation will be treated as a bad request. Allowed values: |
bulkId | string | Yes | |
path | string | Yes | The path to the resource to be operated on. The path should be relative to the base path of the API.
Full path for a federated association operation would be
|
data | UserFederatedAssociationData |
UserFederatedAssociationData
Type: object
2 properties
| Name | Type | Required | Description |
|---|---|---|---|
idp | string | Name of the IdP | |
federatedUserId | string | User identifier in the federated IdP |
BulkFederatedAssociationResponse
Type: object
1 property
| Name | Type | Required | Description |
|---|---|---|---|
Operations | array of BulkAssociationOperationResponse |
BulkAssociationOperationResponse
Type: object
6 properties
| Name | Type | Required | Description |
|---|---|---|---|
bulkId | string | ||
status | object | ||
status.statusCode | integer | ||
status.errorCode | string | ||
status.errorMessage | string | ||
status.errorDescription | string |
Was this page helpful?