-
Notifications
You must be signed in to change notification settings - Fork 361
MFA #40
Comments
Same |
I think app password makes it work , but this could do with being updated for MFA. |
This really should be updated to support MFA |
I have been trying to look at rebuilding the modules to support MFA, unfortunately the best way to make MFA Work right now is to use the Exchange Online Hyrbid module. In a browser supporting ClickOnce Applications, you can visit the MS shortlink http://aka.ms/exopspreview to install it . (It isn't still in preview, but I can't get someone at MS to make me a version that doesn't have preview in the URL) Then, once you have that ClickOnce Application installed, basically anytime it says $ExoSession = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/ -Credential $userCredential -Authentication Basic -AllowRedirection
Import-PSSession $ExoSession Replace that with opening the I have this, as a in-progress method to load the module into any Powershell session, once that module from the link above is installed, though there are some commands that I haven't finished determining the purpose of or how to best replicate yet, so your-mileage-may-vary (Mostly related to reconnection or sessions, it looks like ) function Start-ExoPSSessionCmdlets ( $UserPrincipalName){
Import-Module $((Get-ChildItem -Path $($env:LOCALAPPDATA+"\Apps\2.0\") -Filter Microsoft.Exchange.Management.ExoPowershellModule.dll -Recurse ).FullName|?{$_ -notmatch "_none_"}| sort LastWriteTime -Descending | select -First 1)
$EXOSession = New-ExoPSSession -UserPrincipalName ("$UserPrincipalName")
Import-PSSession $EXOSession -DisableNameChecking -AllowClobber
}
Start-ExoPSSessionCmdlets |
Speaking of rebuilding it to support MFA - Would it be an acceptable solution to try to connect through the normal way ( Or, we could look to see if the Exo Powershell Module is already installed, and use that if it is, and if not, try the |
please look into this... MFA is crucial |
it works using the app password |
I was able to get this to work with MFA using the following for line 41 to 45: #First, let's get us a cred! #This connects to Azure Active Directory |
having issues running this with MFA enabled
The text was updated successfully, but these errors were encountered: