Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Join 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

Reply
smeetsh
Resolver II
Resolver II

Passing a bearer token to copy data action using GET

Hi All,

 

Not a question, but something I ran into, as I am just picking up MS Fabric, pipelines etc.

I needed to use web request, to get an access token that is valid for 30 minutes. Next I needed to use that token as a bearer token to do a follow up API call to get actual data , there didn't seem to be that much info around, when I tried to google it. Eventually I found a you tube video, that told me what i needed to know. (linked below). Things like apikeys and other credentials will of course vary on the API yo are trying to use.

 

This is my flow.

smeetsh_1-1714693398287.png


Step 1 
Do your web request

smeetsh_0-1714693348722.png

 

Step 2 link the Web and copy data action

 

Step 3 In the copy data action  set it up as follows:

smeetsh_2-1714693511064.png

As you can see the value of the Authorization header is dynamic, with in my case, the following expression:

Bearer @{activity('Get access token').output.access_token}

The part ".access_token" depends on the json you get returned, in my case it was a very flat structure with no above array.
{
    "token_type": "BearerToken",
    "issued_at": "xxx",
    "salesforce_id": "xxx",
    "access_token": "xxx",
    "application_name": "xxx",
    "scope": "refresh_token full",
    "expires_in": "xxx"
}

Above you can see where i got the parameter access_token from. If this array had been nested in for instance another array called  "data" then the value would have been data.access_token in stead of just access_token.

I hope this is usefull info to share here. The video I got this from you can find here .

Cheers

Hans




 

1 ACCEPTED SOLUTION

Good morning,

Yes just sharing knowledge, since it wasn't so straightforward to find as I thought it would be

 

Cheers

Hans

View solution in original post

3 REPLIES 3
0simmis0
New Member

Thank you!

Anonymous
Not applicable

Hi @smeetsh ,

Thanks for using Fabric Community. 
Can you please confirm whether this is a question or just sharing the knowledge across the Community?
As I understand you are just sharing the knowledge across the Community.

Good morning,

Yes just sharing knowledge, since it wasn't so straightforward to find as I thought it would be

 

Cheers

Hans

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June FBC25 Carousel

Fabric Monthly Update - June 2025

Check out the June 2025 Fabric update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.