msgraph-metadata icon indicating copy to clipboard operation
msgraph-metadata copied to clipboard

Add ConsistencyLevel support for Get-MgOauth2PermissionGrant

Open commakoerschgen opened this issue 3 years ago • 5 comments
trafficstars

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).

commakoerschgen avatar Jan 28 '22 11:01 commakoerschgen

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 avatar Apr 25 '22 08:04 commakoerschgen

@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?

peombwa avatar Jun 13 '22 22:06 peombwa

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.

commakoerschgen avatar Jun 14 '22 15:06 commakoerschgen

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

commakoerschgen avatar Jul 19 '22 07:07 commakoerschgen

I may have hit this issue also, although not certain: https://github.com/microsoftgraph/msgraph-sdk-powershell/issues/2469

robinmalik avatar Nov 29 '23 07:11 robinmalik