Using Azure Data Factory to call Azure REST API of Azure API Management

Lily 116 Reputation points
2022-04-21T10:59:30.887+00:00

Hi, we try to use Azure Data Factory to call Azure API Management REST API to get data for reporting.
Sample : https://learn.microsoft.com/en-us/rest/api/apimanagement/current-ga/subscription/list

Test okay in Postman, but not sure which Authentication Type should be applied here.
195172-image.png

Need your advice, thank you

Azure API Management
Azure API Management
An Azure service that provides a hybrid, multi-cloud management platform for APIs.
1,784 questions
Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
9,640 questions
{count} votes

Accepted answer
  1. PRADEEPCHEEKATLA-MSFT 78,246 Reputation points Microsoft Employee
    2022-04-22T07:23:33.167+00:00

    Hello @Lily ,

    Thanks for the question and using MS Q&A platform.

    You can use the below method to call Azure REST API of Azure API Management:

    URL:https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/subscriptions?api-version=2021-08-01  
    Method: GET  
    Authentication: System Assigned Managed Identity  
    Resource: https://management.azure.com/  
    

    195426-image.png

    In case if you see this error message: {"error":{"code":"AuthorizationFailed","message":"The client '2bxx-cxx9-4xx3-bxx-8xxxxxx9f4' with object id '2bxx-cxx9-4xx3-bxx-8xxxxxx9f' does not have authorization to perform action 'Microsoft.ApiManagement/service/subscriptions/read' over scope '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}’ or the scope is invalid. If access was recently granted, please refresh your credentials."}}

    Make sure to grant reader permissions for the ADF as shown below:

    195459-image.png

    Here is the complete walkthrough on using Azure Data Factory to call Azure REST API of Azure API Management.

    195417-adf-webactivity.gif

    Hope this will help. Please let us know if any further queries.

    ------------------------------

    • Please don't forget to click on 130616-image.png or upvote 130671-image.png button whenever the information provided helps you. Original posters help the community find answers faster by identifying the correct answer. Here is how
    • Want a reminder to come back and check responses? Here is how to subscribe to a notification
    • If you are interested in joining the VM program and help shape the future of Q&A: Here is how you can be part of Q&A Volunteer Moderators

0 additional answers

Sort by: Most helpful