Question

My application changes password in Office 365 account. However a user is federated (i.e. there is a sync between an on premise AD and O365 (WAAD)), it is not (or limited) allowed to change data in O365 because it should be done in the on premise AD.

How i can check in my code if user federated or not?

Was it helpful?

Solution

A possible way to check if the user is federated or not could be via:

POST
https://login.microsoftonline.com/GetUserRealm.srf
Content-Type: application/x-www-form-urlencoded
Accept: application/json
handler=1&login=johndoe@somecompany.onmicrosoft.com
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top