Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to create Service Principal of Multi-tenant Application

I have created new Azure AAD Application with Multi-tenant enabled. But i Couldn't find App in another tenant ID. When i try to create a Service Principal of above App ID in another Tenant.It is failing with error "New-AzureRmADServicePrincipal : When using this permission, the backing application of the service principal being created must in the local tenant" . Has anyone experience such issue.

$StartDate = [DateTime]::UtcNow                                                                
$EndDate = [DateTime]::UtcNow.AddYears(3)                                                 
$secureString = convertto-securestring "XXXXXXXXX" -asplaintext -force                             
New-AzureRmADServicePrincipal -ApplicationId "XXXXXXXXXX" -Password $secureString -StartDate $StartDate -EndDate $EndDate
like image 871
user145610 Avatar asked Nov 28 '25 00:11

user145610


1 Answers

I fixed my question using following PS command

Connect-AzureAD -TenantId '<TargetTenant>'                                            

New-AzureADServicePrincipal -AppId 'ThirdPartyAppID'
like image 105
user145610 Avatar answered Nov 30 '25 23:11

user145610



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!