0
votes

I want to retrieve groups claims for logged in user from Azure Active Directory. I've enabled groups retrieval in the application manifest in Azure Portal

"groupMembershipClaims": "All"

The number of groups exceeds a limit and I'm getting these claims instead:

_claim_names:   {"groups":"src1"}
_claim_sources: {"src1":{"endpoint":"https://graph.windows.net/12345678-0939-496d-b129-198edd916feb/users/{user-object-guid}/getMemberObjects"}}

However when I make POST request to the endpoint specified in the claims, I'm getting:

{
  "odata.error": {
  "code": "Request_DataContractVersionMissing",
  "message": {
    "lang": "en",
    "value": "The specified api-version is invalid. The value must exactly match a supported version."
    }
  }
}

How do I properly request the group claims? I could use https://graph.microsoft.com/v1.0/me/getMemberObject, but it requires additional permissions and why whould there be another URI in the claims.

1

1 Answers

1
votes

You should append the version ?api-version=1.6 to the endpoint. See a complete code sample here.