且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

从Powershell连接到Azure AD而没有提示

更新时间:2023-02-15 12:21:37

否.如果需要MFA,则无法以用户身份以编程方式登录.

No. If MFA is required, you cannot sign in programmatically as a user.

在这种情况下,需要交互式身份验证.

Interactive authentication is required in that case.

如果您更改策略以允许从没有MFA的计算机进行身份验证,那么它将起作用.

If you change your policies to allow authentication from that machine without MFA, then it will work.

您也可以使用服务主体而不是用户进行身份验证.

You can also use a service principal for authentication instead of a user.