Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -312,6 +312,85 @@ paths:
'https://api.asgardeo.io/t/{organization-name}/o/api/users/v1/user-id/federated-associations/federated-association-id' \
-H 'accept: */*' \
-H 'Authorization: Bearer <token>'
/federated-associations/bulk:
post:
tags:
- admin
summary: Create and Delete users associations in bulk
description: |
This API is used to create and delete users association in bulk. <br>
Maximum number of supported operations in a single request is 1000 by default.
It can be configured using a server level configuration.
<b>Scope required:</b>
* internal_user_fed_association_bulk
parameters:
- name: body
in: body
required: false
schema:
$ref: '#/definitions/BulkFederatedAssociationRequest'
responses:
200:
description: Success
schema:
$ref: '#/definitions/BulkFederatedAssociationResponse'
400:
description: Bad Request
schema:
$ref: '#/definitions/Error'
401:
description: Unauthorized
schema:
$ref: '#/definitions/Error'
403:
description: Forbidden
schema:
$ref: '#/definitions/Error'
500:
description: Internal Server Error
schema:
$ref: '#/definitions/Error'
x-codeSamples:
- lang: Curl
source: |
curl -X 'POST' \
'https://api.asgardeo.io/t/{organization-name}/o/api/users/v1/federated-associations/bulk' \
-H 'accept: */*' \
-H 'Authorization: Bearer <token>' \
-H 'Content-Type: application/json' \
-d '{
"failOnErrors": 0,
"operations": [
{
"method": "POST",
"bulkId": "qewvaewv",
"path": "/1ca49238-3ab0-474b-9d42-8067780a503c/federated-associations",
"data": {
"idp": "Google",
"federatedUserId": "[email protected]"
}
},
{
"method": "POST",
"bulkId": "fgnruyt",
"path": "/7589bffc-b315-4dbd-83a5-86f5b8aa4776/federated-associations",
"data": {
"idp": "Google",
"federatedUserId": "[email protected]"
}
},
{
"method": "DELETE",
"bulkId": "useffger",
"path": "/0a2d94e2-3b98-49ea-89d6-e8dd9e0ff89b/federated-associations"
},
{
"method": "DELETE",
"bulkId": "eefvrtgnrtn",
"path": "/197fc0fa-c2b0-48e6-92a6-a551afc3d125/federated-associations/0dcc3f5a-3bee-4f36-a91f-8ee60dbae875"
}
]
}'
components:
schemas:
Error:
Expand Down Expand Up @@ -415,6 +494,91 @@ components:
type: string
example: [email protected]
description: User identifier in the federated IdP
BulkFederatedAssociationRequest:
type: object
properties:
failOnErrors:
type: integer
example: 1
description: |
This represents whether the API should stop processing the operations if any of them fail. The subsequent
operations after the 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:
type: array
items:
$ref: '#/definitions/BulkFederatedAssociationOperation'

BulkFederatedAssociationOperation:
type: object
required:
- method
- bulkId
- path
properties:
method:
type: string
enum:
- POST
- DELETE
example: POST
description: |
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.
bulkId:
type: string
example: "ytrewq"
path:
type: string
example: "/b1781d25-bde5-460a-a58a-8fe8dbfd8487/federated-associations"
description: |
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
`/t/{tenant-domain}/api/users/v1/{user-id}/federated-associations/{association-id}`.
data:
$ref: '#/definitions/UserFederatedAssociationData'

UserFederatedAssociationData:
type: object
properties:
idp:
type: string
example: "exampleIdP"
description: Name of the IdP
federatedUserId:
type: string
example: "[email protected]"
description: User identifier in the federated IdP

BulkFederatedAssociationResponse:
type: object
properties:
Operations:
type: array
items:
$ref: '#/definitions/BulkAssociationOperationResponse'

BulkAssociationOperationResponse:
type: object
properties:
bulkId:
type: string
example: "qwerty"
status:
type: object
properties:
statusCode:
type: integer
example: "400"
errorCode:
type: string
example: "UAA-10012"
errorMessage:
type: string
example: "Error while adding federated user association: 1890c6c0-d1a0-4eb4-8075-320756d75946"
errorDescription:
type: string
example: "The federated association is already associated to a local user"
securitySchemes:
OAuth2:
type: oauth2
Expand Down
5 changes: 5 additions & 0 deletions en/asgardeo/docs/apis/organization-apis/restapis/idp.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,7 @@ paths:
"userstore": "DEFAULT",
"attributeSyncMethod": "OVERRIDE_ALL",
"associateLocalUser": true,
"skipJITForLookupFailure": false,
"accountLookupAttributeMappings": [
{
"federatedAttribute": "email",
Expand Down Expand Up @@ -1725,6 +1726,7 @@ paths:
"userstore": "DEFAULT",
"attributeSyncMethod": "OVERRIDE_ALL",
"associateLocalUser": true,
"skipJITForLookupFailure": false,
"accountLookupAttributeMappings": [
{
"federatedAttribute": "email",
Expand Down Expand Up @@ -2916,6 +2918,7 @@ components:
scheme: "PROVISION_SILENTLY"
userstore: "PRIMARY"
associateLocalUser: true
skipJITForLookupFailure: false
attributeSyncMethod: "OVERRIDE_ALL"
accountLookupAttributeMappings:
- federatedAttribute: "email"
Expand Down Expand Up @@ -2986,6 +2989,7 @@ components:
scheme: "PROVISION_SILENTLY"
userstore: "PRIMARY"
associateLocalUser: true
skipJITForLookupFailure: false
attributeSyncMethod: "OVERRIDE_ALL"
accountLookupAttributeMappings:
- federatedAttribute: "email"
Expand Down Expand Up @@ -3053,6 +3057,7 @@ components:
scheme: "PROMPT_USERNAME_PASSWORD_CONSENT"
userstore: "PRIMARY"
associateLocalUser: true
skipJITForLookupFailure: false
attributeSyncMethod: "OVERRIDE_ALL"
accountLookupAttributeMappings:
- federatedAttribute: "email"
Expand Down
10 changes: 10 additions & 0 deletions en/asgardeo/docs/apis/restapis/idp.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,7 @@ paths:
"scheme": "PROVISION_SILENTLY",
"userstore": "DEFAULT",
"associateLocalUser": true,
"skipJITForLookupFailure": false,
"attributeSyncMethod": "OVERRIDE_ALL",
"accountLookupAttributeMappings": [
{
Expand Down Expand Up @@ -1612,6 +1613,7 @@ paths:
"scheme": "PROVISION_SILENTLY",
"userstore": "DEFAULT",
"associateLocalUser": true,
"skipJITForLookupFailure": false,
"attributeSyncMethod": "OVERRIDE_ALL",
"accountLookupAttributeMappings": [
{
Expand Down Expand Up @@ -3021,6 +3023,11 @@ components:
type: boolean
default: false
example: true
skipJITForLookupFailure:
description: "Specifies if the JIT provisioning should be skipped in case of lookup failure."
type: boolean
default: false
example: true
accountLookupAttributeMappings:
description: "This variable specifies the mapping between the federated attributes and the local user attributes for account lookup."
type: array
Expand Down Expand Up @@ -3402,6 +3409,7 @@ components:
scheme: "PROVISION_SILENTLY"
userstore: "PRIMARY"
associateLocalUser: true
skipJITForLookupFailure: false
attributeSyncMethod: "OVERRIDE_ALL"
accountLookupAttributeMappings:
- federatedAttribute: "email"
Expand Down Expand Up @@ -3472,6 +3480,7 @@ components:
scheme: "PROVISION_SILENTLY"
userstore: "PRIMARY"
associateLocalUser: true
skipJITForLookupFailure: false
attributeSyncMethod: "OVERRIDE_ALL"
accountLookupAttributeMappings:
- federatedAttribute: "email"
Expand Down Expand Up @@ -3539,6 +3548,7 @@ components:
scheme: "PROMPT_USERNAME_PASSWORD_CONSENT"
userstore: "PRIMARY"
associateLocalUser: true
skipJITForLookupFailure: false
attributeSyncMethod: "OVERRIDE_ALL"
accountLookupAttributeMappings:
- federatedAttribute: "email"
Expand Down
Loading
Loading