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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
Nathant
Regular Visitor

REST Pipeline anonymous with bearer token

How do i create a REST pipeline that connects only with a bearer token? I can't do the first step with anonymous as it tests the connection and of course fails without the bearer and i can't add the bearer as its on the next step?

4 REPLIES 4
Anonymous
Not applicable

Hi @Nathant ,

Thanks for using Fabric Community,

As per my understanding you want to create Rest API Pipeline in Fabric Data Factory.

I assume you might have 2 APIs, API_1 will get a bearer token and other API_2 will get result(final data) on passing bearer token along with header.

Lets assume API_1 requires client_id and client_secret to get bearer token:


api.png

Step 1: Connection - Add your base URL here.
Step 2: Relative URL - Add your relative URL here.
Step 3: Body (Main point) - Can add your client_id and client_secret here in json format

{

    "grant_type":"client_credentials",

    "client_id":"abcdefg",

    "client_secret":"123ghy456"

}

Step 4: Header: Add Content-Type : application/json

Lets assume API_2 requires bearer token to get result (final data):

web_api_2.png

Step 5: Create a New Copy Activity.
Step 6:  Link a Copy Activity to this Web Activity.
Step 7: Creation a Rest API connection with the base URL.
Step 8: Configure connection type and base url (API_2)
Step 9: !Important Configure your header with Authorization: Bearer <token>

web_api_3.png

Step 10: !Important (inorder to pass token dynamic way, not manually)
Configure value with add dynamic content  Bearer @{activity('User_Login_Token').output.data.Token}

Note: .data.Token is as per my json output, you can write your expression based on your json output from API_1.

vgchennamsft_0-1699506231432.png

 


Hope this is helpful. Please let us know incase of any queries.

Anonymous
Not applicable

would it be possible to show us how you configured the connections with authentication kind?

Anonymous
Not applicable

Hello @Nathant ,

We haven’t heard from you on the last response and was just checking back to see if you have a resolution yet.
In case if you have any resolution please do share that same with the community as it can be helpful to others.
Otherwise, will respond back with the more details and we will try to help.

Thank you

Anonymous
Not applicable

Hi @Nathant ,

We haven’t heard from you on the last response and was just checking back to see if you have a resolution yet.
In case if you have any resolution please do share that same with the community as it can be helpful to others.
Otherwise, will respond back with the more details and we will try to help.

Thank you

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.