Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredJoin us at FabCon Vienna from September 15-18, 2025, for the ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM. Get registered
I am working on one of the project where I need to configure the WebAPI in Azure Fabric through the Bearer Token Authentication. I tried writing the Python Script and tried adding the BearerToken from parameter and passing it to the API Call but none of them worked for me while trying to creating through the Data Flow Gen2. Kindly provide the steps to configure the same , I can configure it in the CopyAcitivity but I have to write some transformation logic on the fields so I would like to go with DataFlowGen2 pipeline. Please suggest the proper steps in this regard.
Thanks,
Hameed
Solved! Go to Solution.
Hi @hameed4ru ,
Thanks for posting in the Microsoft Fabric Community.
To call an API with a Bearer Token from Dataflow Gen2, follow these steps:
let
URL = "https://www.strava.com/api/v3/oauth/token",
Headers = [#"Content-Type"="application/json"],
Body = "{""client_id"": ""InsertYourClientIDHere"", ""client_secret"": ""InsertYourClientSecretHere"", ""grant_type"": ""refresh_token"", ""refresh_token"": ""InsertYourRefreshTokenHere""}",
Source = Json.Document(Web.Contents(URL, [Headers = Headers, Content = Text.ToBinary(Body)])),
#"Converted to table" = Record.ToTable(Source),
#"Filtered rows" = Table.SelectRows(#"Converted to table", each ([Name] = "access_token")),
#"Drill down" = #"Filtered rows"{0}[Value]
in
#"Drill down"
This retrieves an access token, which you can use in subsequent API calls.
Here are some similar discussions about API in Dataflow Gen2:
Solved: Dataflows - Web API - authentication - Microsoft Fabric Community
Solved: Re: API in dataflowgen2 - Microsoft Fabric Community
This Document provides additional details about using web API connector in Dataflow Gen2:
How to create a REST connection - Microsoft Fabric | Microsoft Learn
Hope this helps. Please reach out for further assistance
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly and a kudos would be appreciated.
Best Regards,
Vinay.
Thanks for your help, am able to process the api data with the below mentioned steps.
Thanks,
Hameed
Hi @hameed4ru ,
We’re following up once more regarding your issue. If it has been resolved, please mark the helpful reply as the Accepted Solution to assist others facing similar challenges.
Please reach out for further assistance.
Thank you!
Hi @hameed4ru ,
We haven’t heard back from you and wanted to follow up again. If the provided solution resolved your issue, please mark it as the Accepted Solution to assist others in the community.
If you still need help, feel free to reach out.
Looking forward to your response.
Thank you!
Hi @hameed4ru ,
We haven’t heard from you since our last response and wanted to check if the provided solution met your needs. If it did, please consider accepting the solution to help others benefit. Otherwise, feel free to reach out for further assistance.
Thank you!
Hi @hameed4ru ,
Thanks for posting in the Microsoft Fabric Community.
To call an API with a Bearer Token from Dataflow Gen2, follow these steps:
let
URL = "https://www.strava.com/api/v3/oauth/token",
Headers = [#"Content-Type"="application/json"],
Body = "{""client_id"": ""InsertYourClientIDHere"", ""client_secret"": ""InsertYourClientSecretHere"", ""grant_type"": ""refresh_token"", ""refresh_token"": ""InsertYourRefreshTokenHere""}",
Source = Json.Document(Web.Contents(URL, [Headers = Headers, Content = Text.ToBinary(Body)])),
#"Converted to table" = Record.ToTable(Source),
#"Filtered rows" = Table.SelectRows(#"Converted to table", each ([Name] = "access_token")),
#"Drill down" = #"Filtered rows"{0}[Value]
in
#"Drill down"
This retrieves an access token, which you can use in subsequent API calls.
Here are some similar discussions about API in Dataflow Gen2:
Solved: Dataflows - Web API - authentication - Microsoft Fabric Community
Solved: Re: API in dataflowgen2 - Microsoft Fabric Community
This Document provides additional details about using web API connector in Dataflow Gen2:
How to create a REST connection - Microsoft Fabric | Microsoft Learn
Hope this helps. Please reach out for further assistance
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly and a kudos would be appreciated.
Best Regards,
Vinay.
User | Count |
---|---|
13 | |
4 | |
3 | |
3 | |
3 |
User | Count |
---|---|
8 | |
8 | |
7 | |
6 | |
5 |