I'm actually trying to get user information from IEF custom policy via Microsoft Graph API.
I've two technical profiles for access_token and MSGraph API call, access_token is working properly. MSGraph API call Technical profile only works for global queries i.e. /users, /me, etc.
I tried passing the user ObjectID via inputClaim in the request body, header, queryString, but I get "Bad Request" or "Access denied", because Bearer token must be sent in the "Authorization" request header according to https://learn.microsoft.com/en-us/graph/auth/auth-concepts#access-tokens, and URI parameters must be sent in the request body.
Not Working MSGraph API call Technical profile:
<Item Key="ServiceUrl">https://graph.microsoft.com/v1.0/users</Item>
<Item Key="SendClaimsIn">Body</Item>
<Item Key="AuthenticationType">Bearer</Item>
<Item Key="UseClaimAsBearerToken">bearerToken</Item>
<Item Key="AllowInsecureAuthInProduction">false</Item>
<Item Key="ResolveJsonPathsInJsonTokens">true</Item>
</Metadata>
<InputClaims>
<InputClaim ClaimTypeReferenceId="bearerToken" />
<InputClaim ClaimTypeReferenceId="userID" />
</InputClaims>
...
Working MSGraph API call Technical profile:
<Item Key="ServiceUrl">https://graph.microsoft.com/v1.0/users</Item>
<Item Key="SendClaimsIn">Header</Item>
<Item Key="AuthenticationType">Bearer</Item>
<Item Key="UseClaimAsBearerToken">bearerToken</Item>
...
<InputClaims>
<InputClaim ClaimTypeReferenceId="bearerToken" />
</InputClaims>
...
How can I pass id or resources to MSGraph i.e. /users/{a4d7r8s5d}, /users/{user1@domain.com}, etc.
Thanks in advance.