Hello @62498367 , to remove a registered user from Entra ID device you can leverage the Microsoft Graph PowerShell SDK and the MSAL.PS module. Eg.
# Replace the following variables
$TenantId = "string"
$DeviceObjectId = "guid"
$UserId = "guid"
$ClientId = "17a6e0ad-a3ea-4364-9b1a-f0bdc4af8dde"
$token = Get-MsalToken -ClientId $ClientId -TenantId $TenantId -Interactive -Scopes ".default"
Connect-MgGraph -AccessToken ($token.AccessToken | ConvertTo-SecureString -AsPlainText -Force) -NoWelcome
Remove-MgDeviceRegisteredUserByRef -DeviceId $DeviceObjectId -DirectoryObjectId $UserId
Full PowerShell function available here.
Let us know if you need additional assistance. If the answer was helpful, please accept it and rate it so that others facing a similar issue can easily find a solution.