创建 connectedOrganization

命名空间:microsoft.graph

创建新的 connectedOrganization 对象。

权限

要调用此 API,需要以下权限之一。要了解详细信息,包括如何选择权限的信息,请参阅权限

权限类型 权限(从最低特权到最高特权)
委派(工作或学校帐户) EntitlementManagement.ReadWrite.All
委派(个人 Microsoft 帐户) 不支持。
应用程序 EntitlementManagement.ReadWrite.All

HTTP 请求

POST /identityGovernance/entitlementManagement/connectedOrganizations

请求标头

名称 说明
Authorization Bearer {token}。必需。
Content-Type application/json. Required.

请求正文

在请求正文中,提供 connectedOrganization 对象的 JSON 表示形式。

可以在创建 connectedOrganization 时指定以下属性。

属性 类型 说明
displayName String 连接的组织名称。
说明 String 已连接的组织说明。
identitySources identitySource 集合 包含一个元素的集合,即此连接组织中的初始标识源。
state connectedOrganizationState 已连接组织的状态定义具有请求者作用域类型的分配策略 AllConfiguredConnectedOrganizationSubjects 是否适用。 可取值为:configuredproposed

响应

如果成功,此方法在响应 201 Created 正文中返回 响应代码和新的 connectedOrganization 对象。

示例

请求

POST https://graph.microsoft.com/v1.0/identityGovernance/entitlementManagement/connectedOrganizations/
Content-Type: application/json

{
  "displayName":"Connected organization name",
  "description":"Connected organization description",
  "identitySources": [
    {
      "@odata.type": "#microsoft.graph.domainIdentitySource",
      "domainName": "example.com",
      "displayName": "example.com"
      }
  ],
  "state":"proposed"
}

响应

注意: 为了提高可读性,可能缩短了此处显示的响应对象。

HTTP/1.1 201 Created
Content-type: application/json

{
  "id": "35ff48a8-e9d8-4405-8425-0b23694287a4",
  "displayName": "Connected organization name",
  "description": "Connected organization description",
  "createdDateTime": "2021-11-10T01:13:15.541617Z",
  "modifiedDateTime": "2021-11-10T01:13:15.541617Z",
  "state": "proposed",
  "identitySources": []
}