PowerShell命令启用MFA身份验证 [英] PowerShell commands Authentication for MFA Enabled

查看:380
本文介绍了PowerShell命令启用MFA身份验证的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Hi Team,

我正在做powerShell调用作为后台进程有一种方法可以使用应用程序令牌调用powershell命令。我们已尝试过几个应用程序令牌,例如graph api,但即使令牌有效,它也会在执行时出现错误,使用"Connect-MsolService
[-MsGraphAccessToken< String>]"

<如果通过用户名和密码生成令牌但是我们有兴趣在没有用户界面的情况下调用powershell命令,那么
以上呼叫会获得成功。

如果有办法调用powershell,请告诉我们命令仅使用应用程序令牌。

I am doing powerShell call as a background process is there a way to call powershell commands using application token. We have tried few application tokens like graph api but it gives error while executing even if token is valid by using "Connect-MsolService [-MsGraphAccessToken <String>]"

above call get success if token generated through username and password but we are interested in calling powershell commands without user interface.
Please let us know if there is a way to call powershell commands using only application token.

推荐答案

您好,

多重身份验证(MFA) ) 需要两种或多种以下身份验证方法:

The Multi-Factor Authentication(MFA) works by requiring two or more of the following authentication methods:


  • 你知道的东西(通常是密码)
  • 你的东西拥有(一个不容易复制的可靠设备,如手机)
  • 你是什么东西(生物识别技术)

所以,我们需要人工互动使用MFA,请参阅下面的官方文档。

So, we need human interaction when using MFA, please see the official document below.

https://docs.microsoft.com/en-us/azure/active-directory/authentication/concept-mfa-howitworks

最好的问候,

丹尼斯


这篇关于PowerShell命令启用MFA身份验证的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆