How to determine if an email address is a Microsoft 'Work or School' account or a Microsoft Account

隐身守侯 提交于 2019-12-07 16:58:04

问题


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?


回答1:


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/




回答2:


Microsoft released a converged Azure AD v2 of the authentication model. This blog post explains how to register your app to be able to use it. It will allow you to authenticate against both Work or School Account and Microsoft account.

Also, there is a YouTube tutorial here.



来源:https://stackoverflow.com/questions/35487191/how-to-determine-if-an-email-address-is-a-microsoft-work-or-school-account-or

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!