# Office 365 multiple sessions

**URL:** <https://forums.powershell.org/t/office-365-multiple-sessions/15591>\
**Category:** PowerShell Help\
**Created:** [February 5, 2021, 11:47am UTC](https://forums.powershell.org/t/office-365-multiple-sessions/15591 "2021-02-05T11:47:15Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ibehere](https://avatars.discourse-cdn.com/v4/letter/i/7c8e57/32.png) [@ibehere](https://forums.powershell.org/u/ibehere)\
**Post date:** [February 5, 2021, 11:47am UTC](https://forums.powershell.org/t/office-365-multiple-sessions/15591/1 "2021-02-05T11:47:15Z")

</div>

Hello,

So i’ve been working on automating a bunch of tasks that we do daily in Office 365 via PowerShell. The issue I’ve run into is that we need to use Connect-ExchangeOnline, Connect-AzureAD, and ConnectMSOLService.

They all seem to trigger separate logins and of course separate MFA codes. Is there a way to authenticate to all 3 sessions with just 1 login and MFA code?

Thanks for the help.

---

<div class="post-metadata">

**Author:** ![dotnVo](https://avatars.discourse-cdn.com/v4/letter/d/4af34b/32.png) [@dotnVo](https://forums.powershell.org/u/dotnVo)\
**Post date:** [May 16, 2024, 8:27pm UTC](https://forums.powershell.org/t/office-365-multiple-sessions/15591/2 "2024-05-16T20:27:53Z")

</div>


