Azure APIM - making calls to microsoft graph (Azure AD B2C)

juni dev 341 Reputation points
2022-11-08T18:06:10.497+00:00

Hi,

I need to have APIM accepting calls to be directed to AAD B2C Graph for user management (Create User, Update user, Get User).

How can I do that?

In Postman I'm doing it with "Client Credentials" with this body payload. Can I do such transformation/composition in Azure APIM or do I need to instruct my APIM clients to pass the payload exactly as microsoft graph needs it (example below) and APIM just changes the target endpoint?

Example of a valid request (create user) made to ms graph via postman:

{
"accountEnabled": true,
"displayName": "test.user1",
"givenName": "test",
"surname": "user1",
"creationType": "LocalAccount",
"mail": "@zzz.com",
"identities": [
{
"signInType": "emailAddress",
"issuer": "xxxxx.onmicrosoft.com",
"issuerAssignedId": "
@zzz.com"
}
],
"passwordProfile": {
"password": "**********,
"forceChangePasswordNextSignIn": true
},
"passwordPolicies": "DisablePasswordExpiration"
}

Help is really appreciated
Thanks,
JD

Azure API Management
Azure API Management

An Azure service that provides a hybrid, multi-cloud management platform for APIs.

Microsoft Security | Microsoft Entra | Microsoft Entra External ID
Microsoft Security | Microsoft Graph

1 answer

Sort by: Oldest
  1. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.

    9 deleted comments

    Comments have been turned off. Learn more

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.