admin管理员组文章数量:1397219
I'm trying to access the below endpoint of Graph API using $expand
and getting error Parsing OData Select and Expand failed: The result of parsing $expand was at least 3 items deep, but the maximum allowed is 2.
Endpoint :
?$expand=accessPackageCatalog, accessPackageResourceRoleScopes($expand=accessPackageResourceRole($expand=accessPackageResource),accessPackageResourceScope),accessPackageAssignmentPolicies
I need accessPackageResource
to get the applications or groups linked to the accessPackage. Help me on how I can access that.
I'm trying to access the below endpoint of Graph API using $expand
and getting error Parsing OData Select and Expand failed: The result of parsing $expand was at least 3 items deep, but the maximum allowed is 2.
Endpoint :
https://graph.microsoft/beta/identityGovernance/entitlementManagement/accessPackages/f2b3c168-e756-40c1-8532-ad08f9fe0a77?$expand=accessPackageCatalog, accessPackageResourceRoleScopes($expand=accessPackageResourceRole($expand=accessPackageResource),accessPackageResourceScope),accessPackageAssignmentPolicies
I need accessPackageResource
to get the applications or groups linked to the accessPackage. Help me on how I can access that.
- To retrieve applications or groups linked to an Access Package, you need to fetch accessPackageResource. Since $expand depth is limited to 2 levels, you'll need to make multiple API calls. – Pratik Jadhav Commented Mar 27 at 6:28
- @PratikJadhav For an accessPackageResource of any accessPackageResourceRole we should call an API of accessPackageResourceRole/{accessPackageResourceRoleId} which is not supported in Graph APIs, it supports only GET ALL of accessPackageResourceRole. How we can achieve it then? – Debbie Johnson Commented Mar 27 at 6:34
1 Answer
Reset to default 0To work around this, you will have to make multiple API calls to retrieve the neccesary data. You can try the following steps:
1.Retrieve Access Package Details
GEThttps://graph.microsoft/beta/identityGovernance/entitlementManagement/accessPackages/f2b3c168=e756=40c1=8532=ad08f9fe0a77$expand=accessPackageResourceRoleScopes,PackageAssignmentPolicies
2.Retrieve Resource Role Scopes- for each accessPackageResourceRoleScope
retrieved in the first call, make the following call:
GEThttps://graph.microsoft/beta/identityGovernance/entitlementManagement/accessPackageResourceRoleScopes/{resourceRoleScopeId}?$expand=accessResourceRole,accessPackageResourceScope
3.Retrieve Resource Roles-For each accessPackageResourceRole
retrieved in the second call, make the following call:
GEThttps://graph.microsoft/beta/identityGovernance/entitlementManagement/accessPackageResourceRoles/{resourceRoleId}?$expand=accessPackageResource
本文标签:
版权声明:本文标题:azure active directory - Getting "Parsing OData Select and Expand failed" Error in Graph API - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744109187a2591209.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论