I am trying to connect to a SharePoint online communication site which have MFA enabled, I tried running this command:
PS C:\WINDOWS\system32> connect-pnponline "https://***.sharepoint.com/sites/***/" -PnPO365ManagementShell -launchbrowser
where i will get a popup >> then i will enter the code >> enter username and password >> close the popup >> but I got this error:
WARNING: To sign in, use a web browser to open the page https://microsoft.com/devicelogin and enter the code D****9
to authenticate.
WARNING: Code has been copied to clipboard
connect-pnponline : Object reference not set to an instance of an object.
At line:1 char:2
Although I entered the above code and enter the username and password and confirm the MFA.
Anyone advice please?