I would like to connect with my PnP-PowerShell-script to online SharePoint that only ask for an email address to logon. How can I do that? Is that Possible?
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It only takes a minute to sign up.Sign up to join this community
Their is no OOTB way but there are different ways to accomplish it. You have to enter the password one time and save it. After that you can use that save credential to login every time. But this method is local to machine, if you try to connect SPO from different machine then it will not work.
New-StoredCredential, this will store the credentials on the path you mentioned.
Now run this Get-StoredCredential -UserName "", this will load the credentials for you.
Connect-MsolService -Credential (Get-StoredCredential -UserName firstname.lastname@example.org)
Read complete detail here: Saving Credentials for Office 365 PowerShell Scripts and Scheduled Tasks