- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
retrieve token api call with content type x-www-form-urlencoded
hello,
i am trying to retrieve a bearer token using the web activity in febaric pipelines.
the content type is - x-www-form-urlencoded
how do i put in the body details?
grant_type =
client_id =
client_secret =
i called it in thundercloud client in visual studio code and it worked fine. as i populated the above details in Form Encoded.
when i simply put in the details like this i am getting HTTP Status 500 – Internal Server Error
[
grant_type = "xxxxxx",
client_id = xxxxxx,
client_secret = xxxxxxxx
]
thanks!
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello - this doesnt work - i get - HTTP Status 500 – Internal Server Error
however when i use -
content type - application/x-www-form-urlencoded
and in the body i put
grant_type=client_credentials&client_id=<encoded client id>&client_secret=<encoded client secret>
then it works.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @AOSulli ,
Thanks for using Fabric Community,
Inorder to understand how to use client_id and client_secret in your case, please follow below screenshot -
1. Connection - Add your base URL here.
2. Relative URL - Add your relative URL here.
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"
}
4. Header: Add Content-Type : application/json
Hope this is helpful. In case of any queries please feel free.
Ref Link - Ingest data form a rest API with Oauth2 - Microsoft Fabric Community
Hope this is helpful. Please let me know incase of further queries.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello - this doesnt work - i get - HTTP Status 500 – Internal Server Error
however when i use -
content type - application/x-www-form-urlencoded
and in the body i put
grant_type=client_credentials&client_id=<encoded client id>&client_secret=<encoded client secret>
then it works.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
What did you use for "encoded" client id. I'm passing my client id and secret and it's not working. I get the error {"error":"invalid_grant","error_description":"no client credentials user enabled"}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @AOSulli ,
I am happy to know that you were able resolve your query. Please continue using Fabric Community for your further queries.
Note: content type will be different in few scenarios, it might not be always same. But you will be ending up with similar kind of answer.

Helpful resources
Join us at the Microsoft Fabric Community Conference
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Fabric Monthly Update - February 2025
Check out the February 2025 Fabric update to learn about new features.

Subject | Author | Posted | |
---|---|---|---|
02-21-2025 05:24 AM | |||
10-01-2024 04:07 AM | |||
01-25-2025 05:53 AM | |||
07-17-2024 02:00 PM | |||
02-21-2024 08:24 PM |
User | Count |
---|---|
6 | |
4 | |
2 | |
1 | |
1 |
User | Count |
---|---|
13 | |
10 | |
5 | |
5 | |
4 |