1
votes

I have .net daemon that is calling ASP.NET Web API using AzureAD authentication. My authentication flow follows this sample: https://github.com/Azure-Samples/active-directory-dotnet-daemon

I would like to create a separate AD App registration for each daemon instance and identify instances in the Web API app by the Display name property of the App registration. Is there any way to achieve this?

1

1 Answers

0
votes

There is a REST API available for getting the application object data :

**https://graph.microsoft.com/beta/applications/{id}**

enter image description here

Permission for calling the above api require below set of permission:

enter image description here

BTW creating an application in Azure AD also post back the data with display name.

You can refer below docs for reference.

https://docs.microsoft.com/en-us/graph/api/application-get?view=graph-rest-beta&tabs=http

https://docs.microsoft.com/en-us/graph/api/application-post-applications?view=graph-rest-beta&tabs=http

https://developer.microsoft.com/en-us/graph/graph-explorer#

Alternatively it is pretty easy if you are using powershell for getting the display name.

Get-AzureADApplication -Filter "AppId eq 'ed192e92-84d4-4baf-997d-1e190a81f28e'"

Reference :

https://docs.microsoft.com/en-us/powershell/module/azuread/get-azureadapplication?view=azureadps-2.0

Hope it helps.