I am performing an Exchange 2013 to Office365 Migration. I am at the point where I need to make on-prem public folders visible to Office365 mailboxes. I am attempting to run the script sync-modernmailpublicfolders.ps1 per guidance provided here: https://learn.microsoft.com/en-us/exchange/hybrid-deployment/set-up-modern-hybrid-public-folders. Running the script returns:
InitializeExchangeOnlineRemoteSession : Unable to create a remote shell session to Exchange Online. The error is as
follows: "Connecting to remote server outlook.office365.com failed with the following error message : Access is
denied. For more information, see the about_Remote_Troubleshooting Help topic.".
At C:\script\Sync-ModernMailPublicFolders.ps1:506 char:5
- InitializeExchangeOnlineRemoteSession;
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- CategoryInfo : NotSpecified: (:) [Write-Error], WriteErrorException
- FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,InitializeExchangeOnlineRemoteSession
The account being used is has the Office 365 Global Administrator and Exchange Online Organization Management roles assigned. The account does not require MFA. In the same powershell session I can "connect-ExchangeOnline" without issue, so I'm thinking the error message may be misleading or bogus. I've run this script many times in the past in other organizations and never had a problem. On-Prem Exchange 2013 CU23 is patched to within thirty days. I have run the script on different Exchange servers, always with the same result. I have tried running the script in the EMS and in Windows Powershell. All powershell on Exchange servers reports same powershell version:
PS C:\script> $psversiontable
Name Value
PSVersion 5.1.14409.1018
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.14409.1018
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
I have opened a support call with Microsoft, but am not getting anywhere. I'm hoping someone out there has run into this one.
TIA
Tom