Closed
Description
Original HTTP snippet from the docs
GET https://graph.microsoft.com/v1.0/identityGovernance/accessReviews/definitions/filterByCurrentUser(on='reviewer')
C# Snippet:
GraphServiceClient graphClient = new GraphServiceClient( authProvider );
var filterByCurrentUser = await graphClient.IdentityGovernance.AccessReviews.Definitions
.FilterByCurrentUser(AccessReviewScheduleDefinitionFilterByCurrentUserOptions.Reviewer)
.Request()
.GetAsync();
When executed, the URL becomes:
https://graph.microsoft.com/v1.0/identityGovernance/accessReviews/definitions/microsoft.graph.filterByCurrentUser(on=Reviewer)
And the service returns the following error:
{
"error": {
"code": "BadRequest",
"message": "The parameter 'on=Reviewer' is not in scope.",
"innerError": {
"date": "2021-10-22T00:33:40",
"request-id": "d6262272-9b0e-455e-a081-726be78e7b60",
"client-request-id": "2f0a0d8a-626f-f9ec-f543-98f36c191681"
}
}
}
Following two changes don't make a difference:
- Fully qualified function name
microsoft.graph.filterByCurrentUser
vsfilterByCurrentUser
- PascalCase vs camelCase i.e.
Reviewer
vsreviewer
.
Service works fine if the quotes are present.
@andrueastman @MIchaelMainer, I haven't had a chance to dig into the OData spec for this. Do you know whether
- the URL we generate should be allowed by the spec and service needs to be fixed or
- should we fix our URL builder in the SDK?
cc: @darrelmiller @baywet