How to configure client applications?

268 Views Asked by At

I have two applications (ui and api) in Azure Active Directory. How do I add ui application id to knownClientApplications list in api application manifest via PowerShell script?

1

There are 1 best solutions below

2
Sridevi On

I tried to reproduce the same in my environment and got below results:

I created one App registration named API App like below:

enter image description here

Now, I registered one Azure AD registration named UI App like below:

enter image description here

To add this UI App application id to knownClientApplications list in API App application manifest via PowerShell, you can use below script:

$UIAppId = "c94e5f5f-c2b6-4a14-82a4-xxxxxxx"
$API0bjectId = "861f810d-a48f-4cb0-9b71-xxxxxxxx"

Set-AzureADApplication -ObjectId $API0bjectId -KnownClientApplications $UIAppId

Response:

enter image description here

When I checked the same in Portal, UI App ID added successfully to knownClientApplications list in API App application manifest like below:

enter image description here

If you want to set Authorized client applications from PowerShell, you can refer below link:

How do you set preAuthorizedApplications using Powershell by SaurabhSharma-MSFT