I'm having trouble reading Azure AD B2C Custom User attributes via GET /users/{oid} graph api.
curl https://graph.windows.net/VishOrganizationB2CTenant.onmicrosoft.com/users/4a70b88f-2aa9-456c-b8e3-680bbd1bbf9f?api-version=1.6 -H "Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGci...."
Above cURL call doesn't return custom user attribute(s) in the response but I do get built-in user attributes in the response.
I even tried like this:
curl https://graph.windows.net/VishOrganizationB2CTenant.onmicrosoft.com/users/4a70b88f-2aa9-456c-b8e3-680bbd1bbf9f/extension_box_appuser_id?api-version=1.6 -H "Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGci..."
This returns error message:
{"odata.error":{"code":"Request_ResourceNotFound","message":{"lang":"en","value":"Resource 'extension_box_appuser_id' does not exist or one of its queried reference-property objects are not present."}}}
'box_appuser_id' is the custom user attribute I have added in Azure AD B2C tenant.
Can someone please guide me what I'm missing here?
Thanks, Vish