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!Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hi everyone,
I’m currently integrating the RMS Online (Staging) API into Power BI using Power Query (M language) to extract data such as voyage information.
My goal is to authenticate using the /api/v1/service/token/password endpoint to obtain a Bearer token, which I can then reuse to query endpoints like /api/v1/voyage/find_all.
I built a Power Query script that constructs a JSON body and sends it to the RMS token endpoint.
Here’s the core part of the script:
When I run this query, I receive:
Details:
I’ve confirmed that:
The URL is reachable.
My JSON body is being built correctly.
Credentials in Power BI are set to Anonymous for the domain.
Sent the same body using Postman (and it works correctly there).
Tried both:
Content = Json.FromValue(TokenBodyRecord)
and form-encoded body:
Changed the header between:
"application/json"
"application/x-www-form-urlencoded"
Both attempts return 400 Bad Request in Power BI.
I want to:
Successfully retrieve an access_token from the RMS staging environment in Power Query.
Use that token to call endpoints such as:
and convert the returned JSON into a table.
Solved! Go to Solution.
Hi @Yrstruly2021 ,
If you believe Power Query request is not going as intended, the key step is to verify whether Power Query is sending the request payload in the same way Postman does, this step will compare the actual HTTP requests between power query and Postman.
Capture the POST request in Postman (which works), then capture the same request from Power Query using a tool such as Fiddler. Comparing them side-by-side will show if there are differences in headers (such as Content-Type), character encoding, or how the body is formatted (e.g., JSON vs x-www-form-urlencoded). Once we see exactly what differs, we can adjust the Power Query request to match the known working format.
I hope this information helps. Please do let us know if you have any further queries.
Thank you
Hi @Yrstruly2021 ,
May I check if this issue has been resolved? If not, Please feel free to contact us if you have any further questions.
Thank you
Hi @Yrstruly2021
I wanted to check if you had the opportunity to review the information provided. Please feel free to contact us if you have any further questions.
Thank you.
Hi @Yrstruly2021 ,
Thanks for reaching out to the Microsoft fabric community forum.
In Power BI, POST requests made through Web.Contents can only be executed when the data source is configured with Anonymous authentication. So please re check if the Post request from Power Query is going through anonymously.
Also, verify that the URL or API endpoint you’re calling is accurate and matches the one specified in the API documentation.
I hope this information helps. Please do let us know if you have any further queries.
Thank you
I’ve double-checked and confirmed that my Power BI data source is configured as Anonymous for https://staging.rms-online.co.za.
I’ve also verified that the API endpoint is correct — it matches the one provided in the official RMS Online API Integration Guide:
Despite that, I’m still receiving a 400 Bad Request error when the request is sent from Power Query, even though the same credentials and JSON body work correctly when tested in Postman.
It seems that Power Query may be formatting or encoding the request body differently (perhaps due to how it serialises JSON or sets headers).
Would you happen to know whether RMS’s token endpoint requires a particular header, encoding format, or perhaps does not accept JSON payloads but only x-www-form-urlencoded content?
Any additional insights or examples of working POST token requests from Power Query would be highly appreciated.
Hi @Yrstruly2021 ,
If you believe Power Query request is not going as intended, the key step is to verify whether Power Query is sending the request payload in the same way Postman does, this step will compare the actual HTTP requests between power query and Postman.
Capture the POST request in Postman (which works), then capture the same request from Power Query using a tool such as Fiddler. Comparing them side-by-side will show if there are differences in headers (such as Content-Type), character encoding, or how the body is formatted (e.g., JSON vs x-www-form-urlencoded). Once we see exactly what differs, we can adjust the Power Query request to match the known working format.
I hope this information helps. Please do let us know if you have any further queries.
Thank you
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 5 | |
| 2 | |
| 2 | |
| 2 | |
| 1 |