You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Authentication works (MFA is enabled). What i would now expect to do is send an email using the signed-in context like so: Send-PnPMail -To address@contoso.com -Subject test -Body test -From me@tenant.onmicrosoft.com -Password $context.Credentials.GetCredential().Password
However, 'Credentials' returned from the context is null? I'd rather not pop up another prompt for credentials to get the users' password again? Is there something I'm doing wrong?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi.
I've read the docs here: https://pnp.github.io/powershell/cmdlets/Send-PnPMail.html. And i want to send an email from the authenticated user (not the system).
The user will get prompted for their credentials when i run (for example) this at the start:
Authentication works (MFA is enabled). What i would now expect to do is send an email using the signed-in context like so:
Send-PnPMail -To address@contoso.com -Subject test -Body test -From me@tenant.onmicrosoft.com -Password $context.Credentials.GetCredential().Password
However, 'Credentials' returned from the context is null? I'd rather not pop up another prompt for credentials to get the users' password again? Is there something I'm doing wrong?
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions