Search code examples
azureazure-active-directory

Cannot find Azure application using az ad app list but it is shown on Azure Enterprise Apps


I have got an Azure application that is visible on the GUI using enterprise applications, however when I search using the code below it doesnt work.

az ad app list --filter "displayname eq 'AzureDataBricks'"

enter image description here

The issue here is that I will be granting permissions programmatically, and as such need to extract the application details using the name which in turn gets the application id.


Solution

  • az ad app list returns Application objects from Graph API. Enterprise Applications list shows Service Principal objects.

    You need to use az ad sp list to find the service principal you are looking for.

    See this for more info on the difference of applications and service principals: https://learn.microsoft.com/en-us/azure/active-directory/develop/app-objects-and-service-principals