你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

Entra Id Assignment - Upsert

创建或替换 Entra 访问权限分配。

PUT {endpoint}/access/entra/assignments/{objectId}?api-version=2025-03-02-preview

URI 参数

名称 必需 类型 说明
endpoint
path True

string (url)

通信资源,例如 https://my-resource.communication.azure.com

objectId
path True

string

objectId。

api-version
query True

string

要调用的 API 版本。

请求正文

名称 必需 类型 说明
clientIds True

string[]

principalType True

EntraPrincipalType

tenantId True

string

响应

名称 类型 说明
200 OK

EntraAssignment

成功

201 Created

EntraAssignment

已创建

Other Status Codes

CommunicationErrorResponse

错误

示例

Create or Update Assignment

示例请求

PUT https://my-resource.communication.azure.com/access/entra/assignments/b27b64b9-39d2-44a3-869d-67700b74e805?api-version=2025-03-02-preview

{
  "tenantId": "c70d068c-2f32-484d-9455-73070cd5aadd",
  "principalType": "teamsResourceAccount",
  "clientIds": [
    "617d08b5-f35b-4270-87d6-56833d2dee1b"
  ]
}

示例响应

{
  "objectId": "b27b64b9-39d2-44a3-869d-67700b74e805",
  "tenantId": "c70d068c-2f32-484d-9455-73070cd5aadd",
  "principalType": "user",
  "clientIds": [
    "617d08b5-f35b-4270-87d6-56833d2dee1b"
  ]
}
{
  "objectId": "b27b64b9-39d2-44a3-869d-67700b74e805",
  "tenantId": "c70d068c-2f32-484d-9455-73070cd5aadd",
  "principalType": "user",
  "clientIds": [
    "617d08b5-f35b-4270-87d6-56833d2dee1b"
  ]
}

定义

名称 说明
CommunicationError

通信服务错误。

CommunicationErrorResponse

通信服务错误。

EntraAssignment
EntraAssignmentCreateOrUpdateRequest
EntraPrincipalType

CommunicationError

通信服务错误。

名称 类型 说明
code

string

错误代码。

details

CommunicationError[]

有关导致此错误的特定错误的更多详细信息。

innererror

CommunicationError

内部错误(如果有)。

message

string

错误消息。

target

string

错误目标。

CommunicationErrorResponse

通信服务错误。

名称 类型 说明
error

CommunicationError

通信服务错误。

EntraAssignment

名称 类型 说明
clientIds

string[]

objectId

string

principalType

EntraPrincipalType

tenantId

string

EntraAssignmentCreateOrUpdateRequest

名称 类型 说明
clientIds

string[]

principalType

EntraPrincipalType

tenantId

string

EntraPrincipalType

说明
group
tenant
user