appRoleAssignment 资源类型appRoleAssignment resource type

重要说明: Microsoft Graph 中 /beta 版本下的 API 是预览版,可能会发生变化。Important: APIs under the /beta version in Microsoft Graph are in preview and are subject to change. 不支持在生产应用程序中使用这些 API。Use of these APIs in production applications is not supported.

用于记录时用户或组分配给应用程序。Used to record when a user or group is assigned to an application. 在这种情况下,该角色分配将导致应用程序图块显示安装在用户的应用程序访问面板上。In this case, the role assignment will result in an application tile showing up on the user's app access panel. 此实体还可能用于授予对特定的角色中的资源应用程序的另一个应用程序 (作为服务主体建模) 访问权限。This entity may also be used to grant another application (modeled as a service principal) access to a resource application in a particular role. 您可以创建、 读取、 更新和删除角色分配。You can create, read, update, and delete role assignments.

JSON 表示形式JSON representation

下面是资源的 JSON 表示形式。Here is a JSON representation of the resource

{
  "creationTimestamp": "String (timestamp)",
  "id": "guid (identifier)",
  "principalDisplayName": "string",
  "principalId": "guid",
  "principalType": "string",
  "resourceDisplayName": "string",
  "resourceId": "guid"
}

属性Properties

属性Property 类型Type 说明Description
creationTimestampcreationTimestamp DateTimeOffsetDateTimeOffset 授予创建时间。时间戳类型表示使用 ISO 8601 格式的日期和时间信息且始终在 UTC 时间。The time when the grant was created.The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. 例如,2014 年 1 月 1 日午夜 UTC 如下所示:'2014-01-01T00:00:00Z'For example, midnight UTC on Jan 1, 2014 would look like this: '2014-01-01T00:00:00Z'
idid GuidGuid 已分配给主体角色 id。The role id that was assigned to the principal. 必须由其appRoles属性中目标资源应用程序resourceId声明此角色。This role must be declared by the target resource application resourceId in its appRoles property. 如果资源没有声明任何权限,必须指定默认 id (零 GUID)。Where the resource does not declare any permissions, a default id (zero GUID) must be specified. 键。Key. 不可为 null。Not nullable.
principalDisplayNameprincipalDisplayName 字符串String 已授予访问权限的主体的显示名称。The display name of the principal that was granted the access.
principalIdprincipalId GuidGuid 要授予访问权限的主体的唯一标识符 (id)。The unique identifier (id) for the principal being granted the access. 所需在创建。Required on create.
principalTypeprincipalType 字符串String 主体的类型。The type of principal. 这可以是"User","组"或"ServicePrincipal"。This can either be "User", "Group" or "ServicePrincipal".
resourceDisplayNameresourceDisplayName 字符串String 对其进行分配资源的显示名称。The display name of the resource to which the assignment was made.
resourceIdresourceId GuidGuid 唯一标识符 (id) 为其进行工作分配的目标资源 (服务主体)。The unique identifier (id) for the target resource (service principal) for which the assignment was made.

RelationshipsRelationships

None

方法Methods

方法Method 返回类型Return Type 说明Description
获取 appRoleAssignmentGet appRoleAssignment appRoleAssignmentappRoleAssignment 读取属性和 appRoleAssignment 对象的关系。Read properties and relationships of appRoleAssignment object.
UpdateUpdate appRoleAssignmentappRoleAssignment 更新 appRoleAssignment 对象。Update appRoleAssignment object.
删除Delete None 删除 appRoleAssignment 对象。Delete appRoleAssignment object.