【发布时间】:2020-08-18 13:46:46
【问题描述】:
当我使用浏览器时,我使用此端点进行授权:
https://login.microsoftonline.com/organizations/oauth2/v2.0/authorize?client_id=
然后我登录到我的 Microsoft 帐户,它会将我重定向到我的应用程序。
如何登录以从 PowerShell 获取令牌?我需要它来进行测试自动化。我发现了类似的东西 (https://github.com/shawntabrizi/Microsoft-Authentication-with-PowerShell-and-MSAL/tree/master/Authorization%20Code%20Grant%20Flow),但我不确定它是否适合我的情况。
感谢任何帮助。
编辑:
【问题讨论】:
标签: powershell oauth-2.0 azure-active-directory