Azure REST API to get list of PaaS and SaaS services

598 Views Asked by At

Does Azure provide any Management REST APIs to fetch the list of PaaS and SaaS services used by a Azure Account or Subscription.

For e.g. If my Account is using Multifactor Auth, Advisor Services, AD etc I need to get that list of services in a REST API call

I am unable to find these APIs in the below Resource Management API list https://learn.microsoft.com/en-us/rest/api/azure/

1

There are 1 best solutions below

3
On

There is no option to get the list of the PaaS and SaaS Service alone using the API.

However, you can get all the resources under a particular Subscriptionid and filter using it's type using Azure List Resouce API

1st You should find your Paas/Saas Resouce type, for an instance, say it's is Microsoft.DataFactory/factories

    var credentials = SdkContext.AzureCredentialsFactory.FromServicePrincipal("<Clientid>", "<ClientSecret?", "<TenantId>",AzureEnvironment.AzureGlobalCloud);
    var azure = Microsoft.Azure.Management.Fluent.Azure.Configure().Authenticate(credentials).WithDefaultSubscription();
    var resouceManagementClient = new ResourceManagementClient(credentials) { SubscriptionId = "<SubID>" };
    var resource = resouceManagementClient.Resources.ListAsync(new ODataQuery<GenericResourceFilterInner>(x => x.ResourceType == "Microsoft.DataFactory/factories")).Result;

Like that you can add many filters to get that particular resource types.