Dec 14 2021 06:15 AM - edited Dec 14 2021 06:17 AM
Hello,
Quick suggestion would be helpful.
I have 2 MFA enabled on sharepoint online. Looking to pass the credentials to avoid manual touch in script.
I have noticed that when we use the command it gives the new MS prompt to login
Connect-SPOService
while adding Connect-SPOService -Credential it go backed to Old prompt of MS - which result into error
Connect-SPOService : The sign-in name or password does not match one in the Microsoft account system.
At line:1 char:1
$username = "XX@XX.onmicrosoft.com"
$password = "XXXX"
$cred = New-Object -TypeName System.Management.Automation.PSCredential -argumentlist $userName, $(convertto-securestring $Password -asplaintext -force)
Connect-SPOService -Url https://XXXX-admin.sharepoint.com -Crednetial $cred -Region Default
defiantly - tried all the solution available including proxy and all - go success.
Dec 14 2021 06:39 AM