我在 Entra ID 中创建了一个自定义角色,并按照以下步骤操作:
不是我试图使用
https://graph.microsoft.com/v1.0/directoryRole/delta
列出目录角色,但它没有检测到它。
我想,默认情况下自定义角色未激活,并尝试使用
激活自定义角色POST
https://graph.microsoft.com/v1.0/directoryRoles
Content-type: application/json
{
"roleTemplateId": "fe930be7-5e62-47db-91af-98c3a49a38b1"
}
但收到错误消息
{ "error": { "code": "Request_BadRequest", "message": "Could not resolve request to a valid role template. A valid value must be specified for 'displayName' or 'roleTemplateId'.", "details": [ { "code": "PropertyRequired", "message": "Could not resolve request to a valid role template. A valid value must be specified for 'displayName' or 'roleTemplateId'.", "target": "roleTemplateId" } ], "innerError": { "date": "2023-11-24T04:18:34", "request-id": "c2ff8f89-a856-4e53-b0ec-a6d80c7437fd", "client-request-id": "c2ff8f89-a856-4e53-b0ec-a6d80c7437fd" } } }
我将非常感谢任何帮助。需要检测自定义角色以及分配给自定义角色的目录对象的增量。
创建自定义角色时,您可以通过端点列出它
GET /v1.0/roleManagement/directory/roleDefinitions
使用过滤器仅获取自定义角色
GET /v1.0/roleManagement/directory/roleDefinitions?$filter=isBuiltIn eq false
该端点不支持delta