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?

有帮助吗?

解决方案

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
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top