sharepoint online – Remove One Drive Site Collection Owner

We are in the middle of migration to One Drive and during that process we had added a generic account as Secondary owner on each one drive account .But when i am trying to remove that account i am getting the error that the URL is not properly formed .My Code is below

$objCreds = Get-Credential

Connect-SPOService -Url "https://tenant-admin.sharepoint.com" -credential $objCreds

$SiteUrl = Get-SPOSite -Identity https://tenant-my.sharepoint.com/personal/XXXX/

Remove-SPOUser -Site $SiteUrl -loginname "migration@test.com" 

The error i am getting is below .I am sure its not with the URL because i added the user to the site using the URL

enter image description here