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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Unanswered

"'X' is not a valid language code. You must specify a locale identifier (LCID)" error is thrown when deploying extensions through automation APIs

(0) ShareShare
ReportReport
Posted on by

You might have implemented, with Dynamics 365 Business Central SaaS, your own solution to deploy extensions automagically through whatever programming language or using PostMan or via logicApps.
It could happen, then, that when performing a PATCH call like e.g.

api.businesscentral.dynamics.com/.../content

that you might receive an error like

{
"error": {
"code": "Unknown",
"message": "'<integerNumber>' is not a valid language code. You must specify a locale identifier (LCID) or code in the format of language-country/region, such as en-US, de-DE, or da-DK. CorrelationId: <GUID>."
}
}

The rationale behind this error is related on mimic the equivalent of specifying the deployment language as it happens from the Extensions Management UI as shown below:

pastedimage1600781037851v1.png

When using the automation API, the Language is taken from the session language and sometimes a wrong or null value might raise the error described.
Meanwhile development team is analyzing why this is happening and to resolve it in the medium term, the viable solution for this issue is to always include in the Headers the following entry

"Accept-Language" : "en-US"

Or whatever valid language you would like to use in your deployment (typically English). This will be intercepted by the application and converted from LCID into its equivalent Language code and used as GLOBALLANGUAGE within the following sentence in the ExtensionManagement codeunit

pastedimage1600781051761v2.png

I have the same question (3)

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 2,785

#2
Jainam M. Kothari Profile Picture

Jainam M. Kothari 1,007 Super User 2025 Season 2

#3
YUN ZHU Profile Picture

YUN ZHU 948 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans