Forum Discussion
Connecting to multiple Microsoft services with the same session
First of all: The Parameter "userprimaryname" doesn't exist in the EXO Module.
Secondly, I can reproduze this error. My device is entra joined.
When logging in with my Office user logged in on this device, i can SSO into Azure Module and EXO Module.
When trieing the same way with my Entra Global admin, i get prompted to log in twice. No idea why.
If you want to achieve automatically Logon, you can take a look at the "-InlineCredential" Param (Only working in PS7, see docs)
or instantly work with certs
references:
- underQualifriedMar 14, 2025Brass Contributor
hey Schnittlauch - my apologies, the param is "userprincipalname" not userprimaryname. But yes, when I try to login with anything other than my personal account, i'll get prompted to login for both Connect-ExchangeOnline and Connect-IPPSsession - but NOT if I supply the username I'm going to log in to first, and run that as a parameter to both. I'm assuming because i specify the upn, it just reuses the session from the single login.
Though I don't really understand Entra / certificates 100%, I don't think they'd work for my use case - requiring pre-configuration eliminates the reusability. My goal is to have the script require as little config as possible.
I will check out that param, thank you!