TeamViewer Intune Roll out and account Assignment

Hello,

we are installing TeamViewer Clients with intune (32bit version).

I would like to enforce the auto update on all clients.

Therefore I need to assign the clients to an assignment ID.

For the client installation I am using this script.

Intune runs as I know all the scripts as System user. But after the script ran successfully the client still does not have an assignment.

If I run on the local PCs the same powershell script as local administrator the assignment works. The client gets assigned to our account.

What can I do to enforce the assignment with intune?

$TeamViewerClient = "TeamViewer_Full.msi"
$TeamViewerAssignmentID = "ID NUMBER"

Start-Process -FilePath "msiexec.exe" -ArgumentList "/i $TeamViewerClient /qn"
Write-Output "Wait 30 seconds to ensure that the installation is complete."

Start-Sleep -Seconds 30
Write-Output "TeamViewer installed successfully."

##TeamViewer rollout configuration

Write-Output "Configuring TeamViewer Host with Config ID: $TeamViewerAssignmentID"

Start-Process "C:\Program Files (x86)\TeamViewer\TeamViewer.exe" -ArgumentList "assignment --id $TeamViewerAssignmentID" -Wait -NoNewWindow

Would be very thankful if somebody could help.