大网数据广告活动
域与目录服务

Unable to authenticate your credentials error when you connect to Microsoft Entra ID

· 52CE 我爱测

Describes an issue that triggers an Unable to authenticate your credentials. Make sure that your user name is in the format @ error. Occurs when you use the Azure Active Directory module for Windows PowerShell to connect to Microsoft Entra ID.

Summary

This article provides guidance on resolving an "Unable to authenticate your credentials" error when you try to connect to Microsoft Entra ID.

Original product version:   Microsoft Entra ID, Cloud Services (Web roles/Worker roles), Microsoft Intune, Azure Backup, Office 365 User and Domain Management, Office 365 Identity Management
Original KB number:   2929554

Symptoms

When you try to connect to Microsoft Entra ID by using the Azure Active Directory module for Windows PowerShell, you receive the following error message:

Connect-MsolService : Unable to authenticate your credentials. Make sure that
your user name is in the format: <username>@<domain>. If this issue persists,
contact Support.

At line:1 char:1
+ Connect-MsolService
+ ~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : OperationStopped: (:) [Connect-MsolService], Mic
rosoftOnlineException
+ FullyQualifiedErrorId : 0x80048862,Microsoft.Online.Administration.Autom
ation.ConnectMsolService

Cause

This issue occurs if one of the following conditions is true:

  • You used an incorrect format when you entered your user name.
  • Your user account is enabled for Microsoft Entra multifactor authentication.

Resolution

Do one of the following, as appropriate for your situation.

Scenario 1: You used an incorrect format when you entered your user name

Use the following format when you enter your user name:

<user_name >@<domain>

For example, john@contoso.com is in the correct format. Entering john or contoso\john doesn't work.

Scenario 2: Your user account is enabled for Microsoft Entra multifactor authentication

If your user account is enabled for Microsoft Entra multifactor authentication, Microsoft doesn't currently support using the Azure Active Directory module for Windows PowerShell to connect to Microsoft Entra ID.

To perform administrative tasks by using the Azure Active Directory module for Windows PowerShell, use either of the following methods:

  • Disable Microsoft Entra multifactor authentication for the user account.
  • Use a different admin account that isn't enabled for Microsoft Entra multifactor authentication.

Source: Microsoft Learn / IT Pro troubleshooting by Microsoft and contributors. Documentation licensed CC BY 4.0. Code samples are covered by the MIT License. Converted from Markdown, with links normalized and embedded media omitted.

资料来源与适用范围

资料来源
Microsoft Learn / IT Pro troubleshooting
适用范围
See source applicability · Source date 05/11/2020
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY 4.0 (documentation), MIT (code samples)

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。