[{"label":"Latest (v1.0)","version":"latest"}]
csp

Assign Roles To Clients On Organization

Description

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

Request

URL

URL


post
https://{api_host}/csp/gateway/am/api/orgs/{orgId}/clients
Copy

Path Parameters

Path Parameters

string
orgId Required

Unique identifier (GUID) of the organization.

Parameter Serialization Style: simple Explode:false

Request Body

Request Body

AssignRolesToMembersRequest of mimetype application/json Required
{
	"ids": [
		"string"
	]
}
array of string
ids Required

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


customRoles Optional

The custom roles that will be assigned to the members.


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

Authentication

This operation uses the following authentication methods.

Response

Response

Response Body

Response Body

200 OK

Returns AssignRolesToMembersResponse of type application/json

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

{
	"failures": [
		{
			"id": "string",
			"message": "string"
		}
	]
}
failures Optional

List of roles that failed to be assigned.

Errors

Errors

CspErrorResponse
400

One or more clients already part of the organization


CspErrorResponse
401

The user is not authorized to use the API


CspErrorResponse
403

The user is forbidden to use the API


CspErrorResponse
404

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


CspErrorResponse
409

The request could not be processed due to a conflict


CspErrorResponse
429

The user has sent too many requests


CspErrorResponse
500

An unexpected error has occurred while processing the request

Code Samples

Code Samples

cURL Command

curl -X POST -H "Content-Type: application/json" -d '{"customRoles":[{"createdBy":"string","createdDate":"string","expiresAt":3609941597,"lastUpdatedBy":"string","lastUpdatedDate":"string","membershipType":"DIRECT","name":"string","resource":"string"}],"ids":["string"],"organizationRoleNames":["string"],"organizationRoles":[{"createdBy":"string","createdDate":"string","expiresAt":3609941597,"lastUpdatedBy":"string","lastUpdatedDate":"string","membershipType":"DIRECT","name":"string","resource":"string"}],"serviceRoles":[{"serviceDefinitionId":"string","serviceRoleNames":["string"],"serviceRoles":[{"createdBy":"string","createdDate":"string","expiresAt":3609941597,"lastUpdatedBy":"string","lastUpdatedDate":"string","membershipType":"DIRECT","name":"string","resource":"string"}]}]}' https://{api_host}/csp/gateway/am/api/orgs/{orgId}/clients
Vendor Extensions

Vendor Extensions

This operation contains the following vendor extensions defined in the spec:
x-required-roles: org_admin,org_owner,developer
x-slo-tier: TIER2


[{"label":"Latest (v1.0)","version":"latest"}]
csp
Organization Operations
Feedback

Was this page helpful?