Employee Identity (EIAM)

Add Application-Side Role Members

API

# Permissions

The Identity Management API is authorized at the application level. Before calling the API, you need to set API permissions for different applications. For details, please refer to API Permissions.

Permission Code Description
app_role_all Read and write permissions for application-side role APIs
all Read and write permissions for all APIs

# Request Description

POST https://{your_domain}/api/v2/tenant/applications/{app_id}/role-member

# Request Headers

Parameter Name Chinese Name Required Type Description
Authorization Authorization Yes String Format: Bearer {access_token}
Content-Type Content Type Yes String Fixed value: application/json; charset=utf-8

# Request Example

{
    "role_id": "20220420144449385-C66D-E8C1D1D79",
    "account_Ids": [
        "20220415171558023-84A4-ED5C390B8",
        "20220414163425614-2FD6-CA9B208BE"
    ]
}
1
2
3
4
5
6
7

# Request Parameters

Parameter Name Chinese Name Required Type Description
app_id Application ID Yes String Target Application ID
role_id Application-Side Role ID Yes String Target Role ID
account_Ids Application Account ID Collection Yes List Maximum collection capacity: 50

# Response Example

Correct Example:
HTTP/1.1 200 OK
{
    "success_list": [
        "20220415171558023-84A4-ED5C390B8",
        "20220414163425614-2FD6-CA9B208BE"
    ],
    "fail_list": []
}


Error Example:
HTTP/1.1 400 Bad Request
{
    "error_code": " APP.ROLE.0002",
    "error_msg": "应用侧角色不存在"
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17

# Response Parameters

Parameter Name Chinese Name Type Description
success_list Success Collection List Application Account ID Collection
fail_list Failure Collection List Application Account ID Collection

# Error Codes

Status Code Error Code Error Message Handling Measure
400 APP.ROLE.0002 应用侧角色不存在 请检查应用侧角色是否已被删除
The application side role does not exist
400 APP.OBJECTMODEL.0006 未开启应用角色模型 请检查应用角色模型是否开启
The application role model is not opened
400 APP.0001 应用不存在 请检查应用是否已被删除
App does not exist
400 APP.ACCOUNT.0028 应用账号不存在 请检查应用账号是否已被删除
App account does not exist

Understood. I am ready to translate the Markdown content for you. Please provide the text you need translated.