0
votes

I have an azure ADB2C tenant that I'm using with custom policies. One of the custom steps is calling a REST API to get custom attributes of the user. Everything is working so far.

In the call to the REST API I would like to receive, in addition to the current data (email etc.), also the user's timezone on behalf of which the call is made.

Is this possible?

1

1 Answers

0
votes

You can use this Httprequest, and the user's timezone is included in the response.

  GET https://graph.microsoft.com/v1.0/me/mailboxSettings
  GET https://graph.microsoft.com/users/{id|userPrincipalName}/mailboxSettings

However,most of b2c users were registered in b2c,and they are not managed by graph.The other b2c users were locally registered in b2c,these users need to configure an O365 subscription(the necessary conditions for having a mailbox).And if they don't have a mailbox, they won't be able to get a time zone in the way above.Therefore, if you are applying the rest api above, the conditions are very harsh.