Access denied: For more information see help_Remote_Troubleshooting Help


  • I am trying to connect to my O365 environment in PS and I keep getting this error. I did some research and Enabled- PSRemoting which did not resolve the issue. Any other thoughts as to what may be causing this? PS is on the latest version as well.
    Wednesday, July 11, 2018 1:34 PM

All replies

  • What have you tried? 


    Wednesday, July 11, 2018 1:40 PM
  • Everything on the MS doc for troubleshooting this issue.

    Wednesday, July 11, 2018 1:45 PM
  • No.  What code did you try to use.  "access denied" means wrong site url of your account does not have permission/wrong password.


    Wednesday, July 11, 2018 1:53 PM
  • ohh 

    Set-ExecutionPolicy RemoteSigned
    $UserCredential = Get-Credential
    $Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri -Credential $UserCredential -Authentication Basic -AllowRedirection

    Import-PSSession $Session

    It works fine for my co-worker but not me which is odd.

    Wednesday, July 11, 2018 2:02 PM
  • The following is all you need.  If it gives you access denied then contact MS support to help you with your portal and credentials.

    $liveCred = Get-Credential
    $O365Session=New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri -Credential $liveCred -Authentication Basic –AllowRedirection
    Import-PSSession $O365Session


    Wednesday, July 11, 2018 6:44 PM
  • I get the same error after a redirect though. Is there anything I need to change on my machine?

    Thursday, July 12, 2018 8:27 AM
  • No. Access denied comes from the remote system.


    Thursday, July 12, 2018 10:05 AM