Assign Roles To Clients On Organization Using POST

Assign Roles To Clients On Organization Using POST

Assign roles to the specified OAuth client/s in the organization.
User with Developer Role can assign only Organization Member and Developer.
Note: in case of partial success the caller must read the response to see which client ids have not been added successfully

Access Policy

Role User Accounts Service Accounts (Client Credentials Applications)
Organization Admin ✔️ ✔️
Organization Owner ✔️ ✔️
Developer ✔️ ✔️
Request
URI
POST
https://{api_host}/csp/gateway/am/api/orgs/{orgId}/clients
COPY
Path Parameters
string
orgId
Required

Unique identifier (GUID) of the organization.


Request Body
AssignRolesToMembersRequest of type(s) application/json
Required
{
    "customRoles": [
        {
            "createdBy": "string",
            "createdDate": "string",
            "expiresAt": 3609941597,
            "lastUpdatedBy": "string",
            "lastUpdatedDate": "string",
            "membershipType": "string",
            "name": "string",
            "resource": "string"
        }
    ],
    "ids": [
        "string"
    ],
    "organizationRoleNames": [
        "string"
    ],
    "organizationRoles": [
        {
            "createdBy": "string",
            "createdDate": "string",
            "expiresAt": 3609941597,
            "lastUpdatedBy": "string",
            "lastUpdatedDate": "string",
            "membershipType": "string",
            "name": "string",
            "resource": "string"
        }
    ],
    "serviceRoles": [
        {
            "serviceDefinitionId": "string",
            "serviceRoleNames": [
                "string"
            ],
            "serviceRoles": [
                {
                    "createdBy": "string",
                    "createdDate": "string",
                    "expiresAt": 3609941597,
                    "lastUpdatedBy": "string",
                    "lastUpdatedDate": "string",
                    "membershipType": "string",
                    "name": "string",
                    "resource": "string"
                }
            ]
        }
    ]
}
customRoles
Optional

The custom roles that will be assigned to the members.

array of string
ids
Required

IDs of the members to whom the new roles will be assigned.

array of string
organizationRoleNames
Optional

Deprecated: The organization role names that will be assigned to the member (use organizationRoles instead).

organizationRoles
Optional

The organization roles that will be assigned to the members.

serviceRoles
Optional

The service roles that will be assigned to the members.

Authentication
This operation uses the following authentication methods.
Responses
200

Partial Success. Please read the response to see which client ids have failed to assign.

Returns AssignRolesToMembersResponse of type(s) application/json
{
    "failures": [
        {
            "id": "string",
            "message": "string"
        }
    ]
}
failures
Optional

List of roles that failed to be assigned.


400

One or more clients already part of the organization

Returns CspErrorResponse of type(s) application/json
{
    "cspErrorCode": "string",
    "errorCode": "string",
    "message": "string",
    "moduleCode": 0,
    "requestId": "string",
    "statusCode": 0
}
string
cspErrorCode
Optional

cspErrorCode

string
errorCode
Optional

errorCode

string
message
Optional

message

integer As int32 As int32
moduleCode
Optional

moduleCode

string
requestId
Optional

requestId

integer As int32 As int32
statusCode
Optional

statusCode


401

The user is not authorized to use the API

Returns CspErrorResponse of type(s) application/json
{
    "cspErrorCode": "string",
    "errorCode": "string",
    "message": "string",
    "moduleCode": 0,
    "requestId": "string",
    "statusCode": 0
}
string
cspErrorCode
Optional

cspErrorCode

string
errorCode
Optional

errorCode

string
message
Optional

message

integer As int32 As int32
moduleCode
Optional

moduleCode

string
requestId
Optional

requestId

integer As int32 As int32
statusCode
Optional

statusCode


403

The user is forbidden to use the API

Returns CspErrorResponse of type(s) application/json
{
    "cspErrorCode": "string",
    "errorCode": "string",
    "message": "string",
    "moduleCode": 0,
    "requestId": "string",
    "statusCode": 0
}
string
cspErrorCode
Optional

cspErrorCode

string
errorCode
Optional

errorCode

string
message
Optional

message

integer As int32 As int32
moduleCode
Optional

moduleCode

string
requestId
Optional

requestId

integer As int32 As int32
statusCode
Optional

statusCode


404

Organization with this identifier is not found. | Clients [...] not found

Returns CspErrorResponse of type(s) application/json
{
    "cspErrorCode": "string",
    "errorCode": "string",
    "message": "string",
    "moduleCode": 0,
    "requestId": "string",
    "statusCode": 0
}
string
cspErrorCode
Optional

cspErrorCode

string
errorCode
Optional

errorCode

string
message
Optional

message

integer As int32 As int32
moduleCode
Optional

moduleCode

string
requestId
Optional

requestId

integer As int32 As int32
statusCode
Optional

statusCode


409

The request could not be processed due to a conflict

Returns CspErrorResponse of type(s) application/json
{
    "cspErrorCode": "string",
    "errorCode": "string",
    "message": "string",
    "moduleCode": 0,
    "requestId": "string",
    "statusCode": 0
}
string
cspErrorCode
Optional

cspErrorCode

string
errorCode
Optional

errorCode

string
message
Optional

message

integer As int32 As int32
moduleCode
Optional

moduleCode

string
requestId
Optional

requestId

integer As int32 As int32
statusCode
Optional

statusCode


429

The user has sent too many requests

Returns CspErrorResponse of type(s) application/json
{
    "cspErrorCode": "string",
    "errorCode": "string",
    "message": "string",
    "moduleCode": 0,
    "requestId": "string",
    "statusCode": 0
}
string
cspErrorCode
Optional

cspErrorCode

string
errorCode
Optional

errorCode

string
message
Optional

message

integer As int32 As int32
moduleCode
Optional

moduleCode

string
requestId
Optional

requestId

integer As int32 As int32
statusCode
Optional

statusCode


500

An unexpected error has occurred while processing the request

Returns CspErrorResponse of type(s) application/json
{
    "cspErrorCode": "string",
    "errorCode": "string",
    "message": "string",
    "moduleCode": 0,
    "requestId": "string",
    "statusCode": 0
}
string
cspErrorCode
Optional

cspErrorCode

string
errorCode
Optional

errorCode

string
message
Optional

message

integer As int32 As int32
moduleCode
Optional

moduleCode

string
requestId
Optional

requestId

integer As int32 As int32
statusCode
Optional

statusCode


Organization Operations
POST
Activate Organization Refresh Tokens Using POST
POST
Activate Organization Refresh Tokens With Api Token Path Using POST
POST
Assign Roles To Clients On Organization Using POST
POST
Create Trust Member Organization Using POST
POST
Deactivate Organization Refresh Tokens Using POST
POST
Deactivate Organization Refresh Tokens With Api Token Path Using POST
DELETE
Delete Organization Idp Registration Using DELETE
GET
Get Groups In Organizations By Organization Id And Group Search Term Using GET
GET
Get Organization By Id Using GET
GET
Get Organization Clients By Organization Id Using GET
GET
Get Organization Invitations By Organization Id Using GET
GET
Get Organization Roles By Organization Id Using GET
GET
Get Organization Users By Organization Id Using GET
GET
Get Org Linked Idp Details Using GET
GET
Get Sub Organizations By Organization Id Using GET
GET
Get Trust Member Organizations Using GET
GET
Get User Invitation By Organization Id And User Invitation Id Using GET
GET
Get Users In Organization By Organization Id And User Search Term Using GET
POST
Invite Users Using POST
POST
Link Org To Idp Using POST
DELETE
Remove Clients From Organization By Organization Id Using DELETE
DELETE
Remove Users From Organization By Organization Id Using DELETE
DELETE
Revoke User Invitation By Organization Id And User Invitation Id Using DELETE
POST
Search Organization Users By Organization Id And Roles Search Term Using POST
PATCH
Update Organization By Organization Id Using PATCH