When trying Connect-SPOService the screen just hangs with no prompt for credentials

Kirk McLeod 0 Reputation points
2023-04-24T20:03:10.6133333+00:00

I'm simply trying to connect to my tenant's admin interface with the SharePoint Online Management Shell. When I enter the commandlet "Connect-SPOService -Url https://domain-admin.sharepoint.com" the cursor moves to the next line, but I don't ever get prompted for credentials (and no timeout error either). It just seems to spin indefinitely. Any help is appreciated. Is there something I need to request from my network security team?

Microsoft 365 and Office | SharePoint | For business | Windows
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. AllenXu-MSFT 24,951 Reputation points Moderator
    2023-04-25T02:22:28.1+00:00

    Hi @Kirk McLeod,

    Have something to confirm with you:

    • Did you run SharePoint Online Management Shell as administrator?
    • What's your SharePoint Online PowerShell version? Find it using Get-Module -Name Microsoft.Online.SharePoint.PowerShell -ListAvailable | Select Name,Version. Also, try to update it the latest using Update-module microsoft.online.sharepoint.powershell or re-install the SharePoint Online PowerShell.
    • Have a try to use below script to see if the issue persists.
       $username = "******@contoso.sharepoint.com" 
       $password = "password" $cred = New-Object -TypeName System.Management.Automation.PSCredential -argumentlist $userName, $(convertto-securestring $Password -asplaintext -force) 
       Connect-SPOService -Url https://contoso-admin.sharepoint.com -Credential $cred
       
    
    • Can you connect to SharePoint admin center in browser and are you using Azure Active Directory authentication? Is MFA enabled?
    • Have a try to change a device or a network environment and see if the issue still persists.

    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    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.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.