Article ID: 2905767 - View products that this article applies to.
Not sure what release of Office 365 you're using? Go to the following Microsoft website:
Am I using Office 365 after the service upgrade?
Expand all | Collapse all

PROBLEM

When you try to connect to Microsoft Exchange Online by using remote Windows PowerShell, you receive the following error message:
[outlook.office365.com] Connecting to remote server failed with the following error message: Access is
denied. For more information, see the about_Remote_Troubleshooting Help topic.

+ CategoryInfo : OpenError: (System.Manageme....RemoteRunspace:RemoteRunspace) [].
PSRemotingTransportException

+ FullyQualifiedErrorId : PSSessionOpenedFailed

Import-PSSession : Cannot validate argument on parameter 'Session'. The argument is null.
Supply a non-null argument and try the command again.

At D:\Users\Connect.ps1:7 char:21

+ Import-PSSession < < < < $Session

+ CategoryInfo : Invalid Data: (:) [Import-PSSession], ParameterBindingValidationException

+ FullyQualifiedErrorId :
ParameterArgumentValidationError,Microsoft.PowerShell.Commands.ImportPSSessionCommand

CAUSE

This issue occurs for one of the following reasons:
  • You enter an incorrect user name or password.
  • You try to sign in to the service by using an account that doesn't have access to Exchange Online.


SOLUTION

By default, only global admins can connect to Exchange Online by using Windows PowerShell. Other admins must be delegated access in the Exchange Admin Center (in Office 365) or in the Exchange Control Panel (in Office 365 pre-upgrade) to connect to Exchange Online through Windows PowerShell.

To resolve this issue, add the user as a member of the administrator role group. To do this, use one of the following methods, as appropriate for your situation.

Method 1: Use Exchange Admin Center in Office 365

To use the Exchange Admin Center in Office 365 to add a user, follow these steps:
  1. Sign in to the Office 365 portal (https://portal.microsoftonline.com) as an administrator.
  2. On the navigation bar, click Admin, and then click Exchange.
  3. Click Permissions, and then click the Admin Roles tab.
  4. Double-click the role group to which you want to add the user. For example, if you want the user to have full access that includes Windows PowerShell, double-click Organization Management.
  5. To add the user to the list, click Add (+) under Members.
  6. Click Save.

Method 2: Use Exchange Control Panel in Office 365 pre-upgrade

To add a user by using the Exchange Control Panel in Office 365 pre-upgrade, follow the steps that are described in Add or remove role group members.

More information

For more information about how to connect to Exchange Online by using remote PowerShell, go to Connect to Exchange Online Using Remote PowerShell.

Still need help? Go to the Office 365 Community website.

Properties

Article ID: 2905767 - Last Review: December 20, 2013 - Revision: 4.0
Applies to
  • Microsoft Office 365 for enterprises (pre-upgrade)
  • Microsoft Office 365 for small businesses  (pre-upgrade)
  • Microsoft Office 365 for education  (pre-upgrade)
  • Microsoft Exchange Online
Keywords: 
o365 o365a o365e o365p o365m o365062011 o365022013 pre-upgrade after upgrade KB2905767

Give Feedback

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com