Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!
I have create a custom connector but i can not see and use the token because of error
Details: "We cannot convert a value of type Binary to type Text."
at the postman i can post the same url with the same header and body and answer me with json
Solved! Go to Solution.
I solved my problem with putting url, header and body in vars and used these in web.contents.
I solved my problem with putting url, header and body in vars and used these in web.contents.
Hello @Doc-tan Please find the solution :
Before :
The issue you’re experiencing with extracting thetoken from your custom connector is a common problem in Power Query when dealing with API responses.
Even though theAPI worksfinein Postman, Power Query requires careful handling of binary content and JSON parsing.
Here’s what’s happening:
1. Binary Response:Web.Contentsalwaysreturns a binary.You cannot directly treat it as text or JSON. If you try to reference a key beforeparsing, Power Query throwserrors like“Cannot convert a value of type Binary to type Text”.
2. JSONParsing: Onceyou parsethebinary with Json.Document, theoutput is a record, not text. To access thetoken field, you must ensure: oTheresponseis valid JSON. The key matches exactly (Power Query iscase-sensitive). In your API response, the key is"token", not "Token"
Hi @Doc-tan,
Thank you for reaching out to the Microsoft fabric community forum.
The problem is happening inside the Power Query custom connector. In Power Query, the response coming from Web.Contents is treated as Binary by default. But later in the code, it’s being read like normal text/JSON. Because of this mismatch, Power Query throws the error saying it can’t convert Binary to Text, and the token is not getting read.
So this is not related to headers, body, or login details. It’s only a response handling issue in the connector. Once the response is properly handled as JSON, you should be able to access the token without any problem.
please go through with the below document hope it may resolve your Issue:
Json.Document - PowerQuery M | Microsoft Learn
Web.Contents - PowerQuery M | Microsoft Learn
Hope the above provided information help you resolve the issue, if you have any further concerns or queries, please feel free to reach out to us.
Regards,
Community Support Team.
Hi @Doc-tan,
I hope the information provided above assists you in resolving the issue. If you have any additional questions or concerns, please do not hesitate to contact us. We are here to support you and will be happy to help with any further assistance you may need.
Regards,
Community Support Team.
Hello,
I think this Web.Contents - PowerQuery M | Microsoft Learn help me to change my code.
Hi @Doc-tan,
Thank you for sharing the update. If you encounter any problems or have questions after going through the document, feel free to reach out here.
Regards,
Community Support Team.
Vote for your favorite vizzies from the Power BI World Championship submissions!
If you love stickers, then you will definitely want to check out our Community Sticker Challenge!
Check out the January 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 12 | |
| 11 | |
| 7 | |
| 7 | |
| 6 |