I've recently needed to change the primary user on a handful of devices due to staff changes in the same remote office. As part of our configuration we have TeamViewer and a PowerShell script that updates the TeamViewer entry to identify the current primary user. Between the device being handed back in and the new user receiving it we set the associated user name to [Spare] in the TeamViewer list, this is then automatically updated when the new primary user is set.
Last night the PowerShell script ran and all the re-assigned devices were reset back to the user name that enrolled the device. At first I thought this was a fault of the script, reading from the wrong field but I then did a Graph API query and discovered that the Graph details only refer to the original user, despite Azure AD, MEMAC and Company Portal correctly reporting the new user as the primary user.
Am I doing something wrong? Do I need to update them in Graph as well as MEMAC?