Community Tip - Did you get called away in the middle of writing a post? Don't worry you can find your unfinished post later in the Drafts section of your profile page. X
Hello, I have the following error (JavaException: com.thingworx.common.exceptions.InvalidRequestException: Language preferences can be changed only by the user or an administrator ) when trying to change the language of a user. The service is in a thing for which all users have visibility but only the System user has permissions to run it. How can I solve it?
Solved! Go to Solution.
Are you trying to invoke a function called SetLanguagePreferences on user?
I tried calling this function in custom JS service with non-admin user and get the same error message except for not a JavaException (not sure how you are changing the user language exactly)
You will need to add the service executor to a system-defined user group: SecurityAdministrators to allow the user to access service SetLanguagePreferences.
See Help Center > Security Administrators Group section
The users themselves have the permission to change the language preference.
Is it the actual user who is invoking this for themselves or are you trying to set it for a user?
I haven't had to deal with this for a while, but if you are doing it with the actual user and running into this issue,
then I think you can safely assign 'users' to that specific service.
Are you trying to invoke a function called SetLanguagePreferences on user?
I tried calling this function in custom JS service with non-admin user and get the same error message except for not a JavaException (not sure how you are changing the user language exactly)
You will need to add the service executor to a system-defined user group: SecurityAdministrators to allow the user to access service SetLanguagePreferences.
See Help Center > Security Administrators Group section