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 firstname.lastname@example.org