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

Community Tip - Need to share some code when posting a question or reply? Make sure to use the "Insert code sample" menu option. Learn more! X

SetPropertyValues in Custom Authenticator

tayyasamy
1-Visitor

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
ttielebein
14-Alexandrite
(To:tayyasamy)

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?

posipova
20-Turquoise
(To:ttielebein)

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.

ttielebein
14-Alexandrite
(To:posipova)

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

ttielebein
14-Alexandrite
(To:posipova)

Oh, and thanks for your input!!

Announcements


Top Tags