locked
Get Subscriptions using Rest API RRS feed

  • Question

  • User-1404113929 posted

    Hello All,

    I am try to get subscriptions using REST API but bellow error is happened while login 

    AADSTS65005: Invalid resource. The client has requested access to a resource which is not listed in the requested permissions in the client's application registration. Client app ID: 75e7be70-5364-43c8-b86e-900b4bd1a80f. Resource value from request: https://management.core.windows.net/. Resource app ID: 797f4846-ba00-4fd7-ba43-dac1f8f63013. List of valid resources from app registration: 00000003-0000-0000-c000-000000000000, 00000002-0000-0000-c000-000000000000.

    Saturday, June 9, 2018 7:04 AM

All replies

  • User1724605321 posted

    Hi balu.devara,

    AADSTS65005: Invalid resource. The client has requested access to a resource which is not listed in the requested permissions in the client's application registration.

    The error means you did not set permissions for the application to access the Windows Azure Service Management API in Azure AD or set permissions incorrectly. Please try to config it by :

    1. Sign into portal.azure.com with an account that is an administrator in your tenant.
    2. Navigate to Azure Active Directory in the left side bar > App registrations > Your app > All settings.
    3. Under API Access, click Required Permissions.

    4. At the top of this pane, click Add, then click Select an API.

    5. Search for "Windows Azure Service Management API"  .
    6. Click the API that matches the search and click Select at the bottom.

    7. Click all the check boxes next to permissions in the Delegated Permissions section and click Select.. Then click Done in the Add API access pane to the left.

    Best Regards,

    Nan Yu


    Monday, June 11, 2018 8:09 AM
  • User-1404113929 posted

    Hi Nan,

    I have added required permissions to my azure ad but this time i am facing different issue,please find bellow error response.


    "error": {
    "code": "AuthorizationFailed",
    "message": "The client 'c6a4afe4-efe9-4fb9-b313-d62e9d9bcf0b' with object id 'c6a4afe4-efe9-4fb9-b313-d62e9d9bcf0b' does not have authorization to perform action 'Microsoft.Compute/virtualMachines/read' over scope '/subscriptions/f0de239c-2918-484c-be23-1d5fd1935521/resourceGroups/1103-MDM-DEV-03/providers/Microsoft.Compute'."
    }
    }

    Wednesday, June 13, 2018 2:11 PM
  • User1724605321 posted

    Hi balu.devara,

    The error messages shows you are not authorized to perform action 'Microsoft.Compute/virtualMachines/read' over scope because you don't have the relevant permissions . Ho do you get the access token to using the API ?

    Best Regards,

    Nan Yu

    Thursday, June 14, 2018 5:21 AM