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 :
Small and medium business | Business Central, N...
New Discussion

"'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 Microsoft Employee

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

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!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

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

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 2,091 Super User 2026 Season 1

#2
YUN ZHU Profile Picture

YUN ZHU 1,032 Super User 2026 Season 1

#3
Dhiren Nagar Profile Picture

Dhiren Nagar 946 Super User 2026 Season 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans