Announcing the Saviynt Knowledge Exchange unifying the Saviynt forums, documentation, training,
and more in a single search tool across platforms. Read the announcement here.

Win-PS ExchangeOnline loses connection

KenKoch
New Contributor II
New Contributor II
We have an Office365 connection configured to POST to Win-PS and execute PowerShell to change mailbox properties. The powershell payload sent over to Win-PS downloads a PS1 file from our own hosted URL and executes it with our specified parameters. We download it and execute this way to avoid complicated syntax escaping in the POST body.
 
The script PS1 essentially does a connect-exchangeonline (Microsoft ExchangeOnline V3) & connect-AzureAD and then runs a bunch of cmdlets. All in all, a 2-3 second run per updateAccount.
 
When I send less than 10 updateAccount tasks over, things work great.
 
When I send over many tasks (more than 10) things go wonky. Eventually, after a bunch of tasks running correctly, it loses the Exchange connection and cannot self recover. Even though the script is designed to test for a connection and do a new connect-exchangeonline, it doesn't work anymore after the initial breakdown. I even have the script locking things down to 1 connection at a time via a lock file so I know there are no conflicting sessions.
 
I'm thinking there's something shared or conflicting in the way the Win-PS C# handles the runspaces with PowerShell? I have very substantial logging out to our Splunk environment but have run out of ideas to try inside PowerShell to handle the breakdown correctly. Any thoughts? I've tried both as an import-module and a direct PS1 execute on the Win-PS side.. neither one had rock solid results. 
 
Am I doing something unreasonable? Is there a better approach?
1 REPLY 1

timchengappa
Saviynt Employee
Saviynt Employee

Hello @KenKoch 

I am suspecting this behavior is specific to your environment only. Would you please be able to check the win PS connector logs to see if there are any connection timeout errors?

Alternatively from EIC v23.1 onwards, we have introduced configurations to specify connection timeout limits as well as configurations to let the system know the number of tasks that should be picked for each provisioning cycle.

Link to Documentation: https://docs.saviyntcloud.com/bundle/REST-v231/page/Content/Configuring-Provisioning-Tasks-and-Conne...