Setting Locale at Client startup, user.getOrDefault(user.Language) returns None

In my projects I am using AD-Internal, and at Client startup I try to set the user’s preferred Language.

One thing that I have noticed is that in order to retrieve a not None value for a user’s Language I have to manually select a language first.

# Get the user from SSO profile:
user = system.user.getUser("AD-Internal_Auth",

if user is None:
elif user.getOrDefault(user.Language) is not None:

All of the users retrieved from AD have “English (United States)” as their language, but when I run the script above, user.getOrDefault(user.Language) returns None. It’s not until I edit the user that it does return the user’s language.

I expect that getOrDefault would return the Default value as documented, but it returns None instead.

Is there something I am missing?

Should I be setting the Default language somewhere in Ignition’s configuration?

Currently I have a workaround in place; I am just curious about the expected behavior versus reality.