Connect-SPOService fails with The partner returned a bad sign-in name or password error

yagobert 6 Reputation points
2021-10-04T11:07:03.823+00:00

Connect-SPOService -Url https://tenantch-admin.sharepoint.com -Credential ictcvazuresvc@tenant .ch
Connect-SPOService : The partner returned a bad sign-in name or password error. For more information, see Federation Error-handling Scenarios.
In Zeile:1 Zeichen:1

  • Connect-SPOService -Url https://tenantch-admin.sharepoint.com -Credentia ...
  • ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  • CategoryInfo : NotSpecified: (:) [Connect-SPOService], IdcrlException
  • FullyQualifiedErrorId : Microsoft.SharePoint.Client.IdcrlException,Microsoft.Online.SharePoint.PowerShell.ConnectSPOService
SharePoint
SharePoint
A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
9,696 questions
0 comments No comments
{count} vote

2 answers

Sort by: Most helpful
  1. Anupam Shrivastava 176 Reputation points
    2021-10-04T14:27:35.81+00:00

    The account may have MFA enabled. Did you try just using Connect-SPOService -Url https://tenantch-admin.sharepoint.com and typing in the credentials in the prompt?

    0 comments No comments

  2. JoyZ 18,041 Reputation points
    2021-10-05T08:51:47.557+00:00

    @yagobert ,

    As AnupamShri said, it is required if the account is using multi-factor authentication: Connect-SPOService -Url https://contoso-admin.sharepoint.com

    In addition, if you connect to SharePoint online admin via PowerShell through a proxy server, run following commands and retry Connect-SPOService

    $cred = [System.Net.CredentialCache]::DefaultCredentials  
    [System.Net.WebRequest]::DefaultWebProxy.Credentials = $cred  
    

    If an Answer is helpful, please click "Accept Answer" and upvote it.

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.