I would like to authenticate against both Microsoft accounts and 'Work or School' accounts in a Azure multi-tenant environment. Each authentication type requires different requests. If I try to login as a Microsoft account against the 'work or school' request the login will fail at the Microsoft login and not return to my application.
Is there a way to query if a given email address is a 'Work or School' account against the Microsoft graph API?
If you use the REST api, it should automatically handle the two types of accounts.
However, it is in preview and might have restrictions or issues.
Here is a guide for using the REST api: http://graph.microsoft.io/en-us/docs/platform/rest
But be sure to check if that is acceptable to work with given the restrictions: https://azure.microsoft.com/en-us/documentation/articles/active-directory-v2-limitations/
来源:https://stackoverflow.com/questions/35487191/how-to-determine-if-an-email-address-is-a-microsoft-work-or-school-account-or