I am trying to connect to SharePoint with the below PowerShell code. And for my account Multi-Factor Authentication is enabled.
$AdminSiteURL= "https://xxxxxxxxx" Connect-PnPOnline -Url $AdminSiteURL -UseWebLogin
After running the code, web login window is prompting but its auto closing soon after 2 seconds. Unable to figure put the error.
Please help me with this issue.