$expand query not working on List roleAssignmentSchedules

Hieu Nguyen 0 Reputation points
2024-12-09T20:05:44.76+00:00

Hello,

I am seeing 501 response when using $expand on List roleAssignmentSchedules
https://zcusa.951200.xyz/en-us/graph/api/rbacapplication-list-roleassignmentschedules?view=graph-rest-1.0&tabs=csharp

Request url: https://graph.microsoft.com/v1.0/roleManagement/directory/roleAssignmentSchedules?$expand=activatedUsing,appScope,directoryScope,principal&$top=999
for some of my tenants, but not all.
Error message from response: The query pattern is not supported by the service; if you are using '$expand' or '$select', some properties might not be retrievable.

Is there any prerequisite to use expand for this endpoint like specific licenses or subscriptions?

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
12,651 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Yakun Huang-MSFT 8,355 Reputation points Microsoft Vendor
    2024-12-10T02:22:53.2766667+00:00

    Hello Hieu Nguyen,

    Thank you for reaching out to Microsoft Support!

    According to your problem description, we ran the same test on this endpoint in Graph Explorer, but the test results are fine, and there are no errors. The test results are as follows:

    User's image

    According to your description, for some accounts may appear the wrong, please check that the assignment rights RoleAssignmentSchedule.Read.Directory are granted correctly and that the account has the following roles:

    User's image

    Reference document:

    https://zcusa.951200.xyz/en-us/graph/api/rbacapplication-list-roleassignmentschedules?view=graph-rest-1.0&tabs=csharp

    Hope this helps.

    If the answer is helpful, please click Accept Answer and kindly upvote it. If you have any further questions about this answer, please click Comment.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.