web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Unanswered

Multiple Headers required using RetailWebRequest AX 2012

(0) ShareShare
ReportReport
Posted on by 5

I need to be able to pass 2 headers via the RetailWebRequest.parmHeaders() in AX2012. I have both a subscription-key and bearer token I need to pass to the endpoint URI to enable successful retrieving on data.

Do i need to build a string and pass that via the parmHeaders method? My current code below;

request2 = RetailWebRequest::newUrl("MyURL");
request2.parmHeader("Ocp-Apim-Subscription-ey:"MySubKey");
request2.parmContentType("application/json");
request2.parmMethod("GET");
response2 = webAPI2.getResponse(request2);
rawResponse = response2.parmData();

If i just pass the header string shown, it accepts but gives me the error of not having a valid bearer key. This is where i need to pass 2 headers.

If there's another track i need to head down then any advice would be grateful!

I have the same question (0)

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Giorgio Bonacorsi Profile Picture

Giorgio Bonacorsi 689

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 606 Super User 2026 Season 1

#3
CP04-islander Profile Picture

CP04-islander 356

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans