When trying to execute a PowerShell command to create a new Service principal for a Multitenant App from Tenant A to Tenant B, where the Tenant B Admin is trying to give consent and register the app from Tenant A using this command:
New-AzureADServicePrincipal -AppId "APP ID GUID"
I am getting this error:
New-AzureADServicePrincipal: Could not load file or assembly 'RestSharp, Version=106.3.1.0, Culture=neutral, PublicKeyToken=598062e77f915f75'. Could not find or load a specific file. (0x80131621)
The PS command is being executed directly in the Azure Portal PowerShell CLI window, on the Tenant B subscription
I tested this command, and it works well for me:
I think your problem is caused by the Rest Sharp version, you can go to the Nuget package manager, then change the version of Rest Sharp and install it. Similar problem please see:here
This should work. Please Create an Azure support request to better address this issue.
User contributions licensed under CC BY-SA 3.0