The REST API call in an Azure AD B2C custom policy defines a fixed URL in the "ServiceUrl" field.
The Graph API call for a read is of the form e.g.:
.../users/objectID
so the URL needs to be dynamic.
You could add objectID as an input claim but how would it get into the URL?
The output is a JSON object. I presume you could do a claims transformation on that to get a particular attribute defined in the output claim.
Writing to the Graph API requires a PATCH but the custom policy REST API call only allows GET and POST.
There doesn't seem to be a claims transformation to build up a JSON object to write from output claims.
Is calling the Azure AD Graph API from a custom policy possible?