msgraph-metadata
msgraph-metadata copied to clipboard
Add ConsistencyLevel support for Get-MgOauth2PermissionGrant
Please add ConsistencyLevel support to Get-MgOauth2PermissionGrant in order to enable advanced queries, which are supported for these objects (https://docs.microsoft.com/en-us/graph/aad-advanced-queries).
Any update? As of Graph PS SDK 1.9.5, the parameter is still not available, so I suspect that the metadata have not been fixed yet.
@commakoerschgen, PR https://github.com/microsoftgraph/msgraph-metadata/pull/165 adds the header to /servicePrincipals/{id}/oauth2PermissionGrants and /users/{id}/oauth2PermissionGrants relationships as described in https://docs.microsoft.com/en-us/graph/aad-advanced-queries?tabs=http.
/oauth2PermissionGrants (object) is not documented as supporting consistency level header anywhere. Do you have a reference that says the object supports consistency level?
Sorry, about the confusion, I just realized that there is no documentation for that.
However, consistency level is supported by /oauth2PermissionGrants. That was pointed out to me by an MS employee when analyzing inconsistencies on the data returned by MS Graph. It turned out that the results provided by /oauth2PermissionGrant are incomplete without using the consistency level header. (That was the occasion for opening this issue.)
As the situation still persists, I will open an issue for the docs in order to have the consistency level support properly documented.
The consistency level header support for /oauth2PermissionGrants is now documented here https://docs.microsoft.com/en-us/graph/aad-advanced-queries?context=graph%2Fapi%2F1.0&view=graph-rest-1.0&tabs=http
I may have hit this issue also, although not certain: https://github.com/microsoftgraph/msgraph-sdk-powershell/issues/2469