Forum Discussion
Prabhakar Sastry
Feb 05, 2018Brass Contributor
Authenticating to O365 using Powershell without MFA
Hi All,
We've got ADFS and SSO enabled without MFA for the Admins, strong authentication is enabled and when trying to connect via PowerShell was able to connect when try to give the credentials ma...
Deleted
Feb 05, 2018If you want to store credentials please use the credential manager instead of a txt file which is like putting your credentials open to the internet
Pablo R. Ortiz
Feb 05, 2018Iron Contributor
well, storing encrypted password in C:\ isn't exposing anything to the internet, but yes, you could also store credentials in credential manager, with a name (let's say O365), install the module and import your credentials:
Install-Module -Name CredentialManager $Credentials = Get-StoredCredential -Target O365 Connect-msolService -Credential $Credentials