Azure Active Directory OAuth 资源所有者密码凭据流

Azure Active Directory OAuth Resource Owner Password Credentials Flow

在我正在处理的项目之一中,我需要使用资源所有者密码凭证流程,但官方文档不支持它:https://msdn.microsoft.com/library/azure/aeab0a46-4da1-4300-be9c-3be418f07a5b.aspx/ it only supports Authorizartion Code and Client Credentials. A google search led me to this github link 说资源所有者密码凭证可以完成,我测试了它,它工作正常,但我不知道它将来是否可用。那么,有人知道吗?

这是一个完全受支持的流程,并且在可预见的未来也会如此。但是,出于安全和功能原因,不鼓励使用流程。请参阅以下答案,更深入地了解为什么不鼓励这样做。

How to authenticate user with Azure Active Directory using OAuth 2.0?

此流程的使用应主要保留给命令行工具或交互式流程根本不可能的场景。

如果您不想自己实施 OAuth 2.0 交互,您可以考虑使用 Active Directory 身份验证库 (ADAL)。

https://msdn.microsoft.com/en-us/library/azure/dn151135.aspx