Forum Discussion
Jeff Harlow
Feb 05, 2019Iron Contributor
Unable to connect to Exchange Online (Powershell) with MFA
Anyone see this error when attempting to connect to Exchange Online with MFA? out-lineoutput : The method or operation is not implemented. + CategoryInfo : NotSpecified: (:) [out-...
kabelo Phefo
Feb 07, 2019Copper Contributor
I had the smililar issue and it turned out to be the old version of MSOnline and AzureAD please try use the below make sure to uninstall old AzureAD if you have one installed.
AzureAD V2 module: https://www.powershellgallery.com/packages/AzureAD/2.0.0.131
MSOnline module: https://www.powershellgallery.com/packages/MSOnline/1.1.166.0
- Jeff HarlowFeb 07, 2019Iron Contributor
Sadly none of these have fixed the problem. I can confirm my scripts work with Visual Studio Code. Guess I have to get used to using this instead. Not a bad thing I suppose.
- EvanAlmightyDec 12, 2019Copper Contributor
I'm using something I found online similar to what VasilMichev posted earlier. This allows me to establish a MFA enabled EXOPSession from within a script I run via the ISE:
$CreateEXOPSSession = (Get-ChildItem -Path $env:userprofile -Filter CreateExoPSSession.ps1 -Recurse -ErrorAction SilentlyContinue -Force | Select -Last 1).DirectoryName . "$CreateEXOPSSession\CreateExoPSSession.ps1" Connect-EXOPSSession -userprincipalname
Hope that helps.