Reputation:
I'm wondering how to retrieve my enterprise apps with Graph API. Is it really done by accessing the service principals? Because if I get the service principals, the display names are different than in the Azure AD UI.
Thanks!
Upvotes: 0
Views: 2041
Reputation:
I found the solution. Here is how to fetch enterprise apps only in C#:
var servicePrincipals = await _graphServiceClient
.ServicePrincipals
.Request()
.GetAsync();
foreach (var app in servicePrincipals )
{
foreach (var tag in app.Tags)
{
if (tag == "WindowsAzureActiveDirectoryIntegratedApp")
{
// do something with enterprise app
}
}
}
Upvotes: 3