cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

SetPropertyValues in Custom Authenticator

Highlighted
Newbie

SetPropertyValues in Custom Authenticator

One quick question if any can answer immediately if possible.

I am following this link for authenticator, https://support.ptc.com/appserver/cs/view/solution.jsp?n=CS244163&lang=en_US

Thing SSOThing = (Thing)EntityUtilities.findEntityDirect("SSOThing", ThingworxRelationshipTypes.Thing);

SSOThing.setPropertyValue("KeyName", new StringPrimitive(userName));

This code snippet i am trying to use in my custom authenticator also, inside authenticate function to update property, but i am getting error like,

"com.thingworx.common.exceptions.InvalidRequestException: Not authorized for PropertyWrite on KeyName in SSOThing" and no user name is displayed in the Logs for the custom authenticator.

4 REPLIES 4

Re: SetPropertyValues in Custom Authenticator

What does appear in the column of the Application log labeled "User", nothing? Polina Osipova​, does that mean that the System user is calling these services? How does the System user appear in the logs?

Re: SetPropertyValues in Custom Authenticator

Since one cannot log in as a system user, and therefore, execute a service directly through the system user, a system user will never appear in the logs. When a system user is being used, a user column in the logs will show the actual User that invoked a service through the use of system user.

Re: SetPropertyValues in Custom Authenticator

Ok, so we don't know what it means if no user appears in the logs then. Interesting... I believe I need to follow up with R&D about this issue

Re: SetPropertyValues in Custom Authenticator

Oh, and thanks for your input!!