Setting Team Location through API logs user out

My business has around 30 daily active employees, who are dynamically assigned locations based on an external schedule. I have a system in place that assigns my Square team members to the single location that they are working at each day.

Say for example I have Location A and B, and Employee.

Employee is scheduled at Location A, but worked at Location B yesterday.

I programmatically update Employee to remove the Location B assignment, and assign Location A. This logs my user out of their Square account on their device.

Is there a way to avoid them being signed out every time? I cannot trust my employees to switch locations on their own every day.

Hi @lium, when you say you are dynamically assigning employees to locations, does that mean you are calling UpdateTeamMember and modifying their assigned_locations? For your use case, is it viable to leave assigned_locations populated with all locations that a given employee can potentially work at, then manage shift assignments to handle which specific location the employee is at for a given day?