Unable to connect to Security & Compliance center using PowerShell

Deleted
Not applicable

Hi,

 

I unable to connect to the Security and Compliance Center using the following commands:

 

$UserCredential = Get-Credential$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://ps.compliance.protection.outlook.com/powershell-liveid/ -Credential $UserCredential -Authentication Basic -AllowRedirection

I have successfully connected to the Security and Compliance Center before using the same method and same account (Org Mgmt in Security and Compliance Permissions and Exchange Online ).

 

I can access other Office 365 services which suggests the password is correct.

 

I am given the following error:

 

Connecting to remote server failed with the following error message: Access is
denied. For more information, see the about_Remote_Troubleshooting Help topic.

 

Can anyone advise how to remediate this issue?

 

Kind Regards,

Jordan

7 Replies

Note: I can access the Security and Compliance Center with the same account from the Office 365 Web Portal.

Do you happen to have Azure MFA enabled on that account? Or any other 2FA? If so, you need to use the ADAL-enabled module: https://technet.microsoft.com/en-us/library/mt811266(v=exchg.160).aspx

Hi Vasil,

 

No, I do not have 2FA set up for the account.

 

Thanks,

Jordan

How about any type of Conditional access? If possible, try to test this on a different machine, different network location, to make sure it's not something in the local environment.

Hi Vasil,

I have created a new VM in Azure and retested with the same account and still received the same error message.

Kind Regards,
Jordan

Time to open a support case I guess.

Did you ever get this resolved? I'm encountering the same issue.