Logic Apps Invoking Azure Synapse REST API

Nagarajan Kuppuswamy 1 Reputation point
2022-06-03T12:25:52.97+00:00

Hello,
Logic Apps provides HTTP option to invoke REST API (we could use it for Synapse), unfortunately they don’t have connector like Azure Data factory. The following REST API to run the pipeline expects a token,

Pipeline - Create Pipeline Run - REST API (Azure Synapse) | Microsoft Learn (in order to run this Pipeline, it needs a Token but could not find out a way to get token).

Some links are there for Powershell to get token. So far did not get any concrete step/direction.

Referred So far,

How to start Synapse Pipeline from Rest API - Microsoft Tech Community

Kindly assist.

Azure Logic Apps
Azure Logic Apps
An Azure service that automates the access and use of data across clouds without writing code.
2,868 questions
Azure Synapse Analytics
Azure Synapse Analytics
An Azure analytics service that brings together data integration, enterprise data warehousing, and big data analytics. Previously known as Azure SQL Data Warehouse.
4,417 questions
{count} votes

3 answers

Sort by: Most helpful
  1. HimanshuSinha-msft 19,381 Reputation points Microsoft Employee
    2022-06-06T22:07:16.047+00:00

    Hello @Nagarajan Kuppuswamy ,
    Thanks for the question and using MS Q&A platform.
    As we understand the ask here is how to get the bearer token , please do let us know if its not accurate.
    I think the steps are well called out in the below post .

    https://learn.microsoft.com/en-us/answers/questions/705328/get-bearer-token-for-azure-management-api-using-da.html

    Please do let me if you have any queries.
    Thanks
    Himanshu


    • 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 comments No comments

  2. Nagarajan Kuppuswamy 1 Reputation point
    2022-06-09T06:20:24.96+00:00

    Thanks Himanshu. Can you please share how to register the application to provide the client id and secrets , as mentioned here.

    URL: https://login.microsoftonline.com/common/oauth2/authorize
    METHOD: POST
    HEADERS: Content-Type = application/x-www-form-urlencoded
    BODY: grant_type=client_credentials&client_id={id}&client_secret={secret}&resource=https://management.azure.com

    Is there any documentation that explains about registering and getting the right details ?

    0 comments No comments

  3. Nagarajan Kuppuswamy 1 Reputation point
    2022-06-09T15:15:34.487+00:00

    Hello Himanshu,
    We could generate a token and when we use the token and invoke the REST API (Synapse Pipeline), we get the following error now.
    {
    "code": "InvalidTokenAuthenticationAudience",
    "message": "Token Authentication failed with SecurityTokenInvalidAudienceException - IDX10214: Audience validation failed. Audiences: 'System.String'. Did not match: validationParameters.ValidAudience: 'System.String' or validationParameters.ValidAudiences: 'System.String'."
    }

    Kindly check

    0 comments No comments