PowerShell asking for credentials frequently, while executing exchange online cmdlets.

%3CLINGO-SUB%20id%3D%22lingo-sub-1023831%22%20slang%3D%22en-US%22%3EPowerShell%20asking%20for%20credentials%20frequently%2C%20while%20executing%20exchange%20online%20cmdlets.%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1023831%22%20slang%3D%22en-US%22%3E%3CP%3EHi%2C%3C%2FP%3E%3CP%3EI%20am%20executing%20single%20exchange%20online%20cmdlet%20in%20Power%20Shell.%20But%20it%20asking%20for%20credentials%20frequently%2C%20for%20every%20one%20minute.%20It%20was%20too%20annoying%2C%20to%20give%20credentials%20multiple%20time%20for%20a%20single%20cmdlet%20execution.%3C%2FP%3E%3CP%3EWhat%20is%20the%20reason%20of%20this%20case%3F%3C%2FP%3E%3CP%3EAnd%20How%20many%20Exchange%20online%20sessions%20allowed%20for%20a%20tenant%3F%3C%2FP%3E%3CP%3ENote%20%3A%26nbsp%3B%20And%20I%20am%20using%20separate%20account%20for%20this%20operations.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1023831%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EOffice%20365%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1024517%22%20slang%3D%22en-US%22%3ERe%3A%20PowerShell%20asking%20for%20credentials%20frequently%2C%20while%20executing%20exchange%20online%20cmdlets.%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1024517%22%20slang%3D%22en-US%22%3E%3CP%3EThis%20depends%20on%20many%20factors%2C%20but%20overall%20Exchange%20Online%20remote%20PowerShell%20is%20known%20to%20be%20prone%20to%20connectivity%2Fstability%20issues.%20Either%20use%20the%20recently%20announced%20%22v2%22%20cmdlets%20(%3CA%20href%3D%22https%3A%2F%2Fwww.petri.com%2Fexchange-online-powershell-goes-restful%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fwww.petri.com%2Fexchange-online-powershell-goes-restful%3C%2FA%3E)%20or%20the%20methods%20detailed%20here%3A%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2FExchange-Team-Blog%2FRunning-PowerShell-cmdlets-for-large-numbers-of-users-in-Office%2Fba-p%2F604280%22%20target%3D%22_blank%22%3Ehttps%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2FExchange-Team-Blog%2FRunning-PowerShell-cmdlets-for-large-numbers-of-users-in-Office%2Fba-p%2F604280%3C%2FA%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E
Occasional Contributor

Hi,

I am executing single exchange online cmdlet in Power Shell. But it asking for credentials frequently, for every one minute. It was too annoying, to give credentials multiple time for a single cmdlet execution.

What is the reason of this case?

And How many Exchange online sessions allowed for a tenant?

Note :  And I am using separate account for this operations.

1 Reply

This depends on many factors, but overall Exchange Online remote PowerShell is known to be prone to connectivity/stability issues. Either use the recently announced "v2" cmdlets (https://www.petri.com/exchange-online-powershell-goes-restful) or the methods detailed here: https://techcommunity.microsoft.com/t5/Exchange-Team-Blog/Running-PowerShell-cmdlets-for-large-numbe...