Using "Connect-IPPSSession" with credentials

Marc 611 Reputation points
2021-12-27T14:33:40.68+00:00

Is it possible pass the credentials: username and password to connecto to EOP by the command "Connect-IPPSSession -ConnectionUri https://ps.protection.outlook.com/powershell-liveid/"?

I know that I could youse -UserPrincipalName but this option doesn't include the password so is not usable for me.

Exchange | Exchange Server | Management
Exchange | Exchange Server | Management

The administration and maintenance of Microsoft Exchange Server to ensure secure, reliable, and efficient email and collaboration services across an organization.

Windows for business | Windows Server | User experience | PowerShell
0 comments No comments

3 answers

Sort by: Oldest
  1. Rich Matheisen 47,976 Reputation points
    2021-12-27T15:33:25.187+00:00

    Was this answer helpful?

    0 comments No comments

  2. Vasil Michev 128.5K Reputation points MVP Volunteer Moderator
    2021-12-27T15:34:48.937+00:00

    Yes, the cmdlet does support a -Credential parameter. So you can do this:

    $cred = Get-Credential ******@domain.com
    Connect-IPPSSession -Credential $cred
    

    Note however that this will always result in connecting via Basic authentication, which might be blocked in your organization. Whereas using the -UserPrincipalName parameter, or connecting without specifying any parameters supports Modern authentication/MFA too.

    Was this answer helpful?

    0 comments No comments

  3. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.

    1 deleted comment

    Comments have been turned off. Learn more

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.