Hi @Khushi,
As MFA is enabled for user account, you have below two options while authenticating using Connect-PnPOnline
:
- Use
-Interactive
(previouslyUseWebLogin
):
Connect-PnPOnline -Url https://******.sharepoint.com/ -Interactive
Use App Password for Office 365:
You can use App password in place of normal password to login easily.
I am using App Password for authentication in PowerShell as well as SharePoint Designer and it works well.
Create an app password for Office 365.
You can find more details in below threads:
- Connect-SPOService : The sign-in name or password does not match one in the Microsoft account system
- The sign-in name or password does not match one in the Microsoft account system
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.