Skip to main content
1-Visitor
June 26, 2014
Question

Current User Service

  • June 26, 2014
  • 3 replies
  • 3862 views

Hello,

Is there a service which can be run in a mashup to determine what user is currently signed in?

Thank you,

Mike

    3 replies

    5-Regular Member
    June 26, 2014

    Hi Michael,

    Yes there is a way to get the current user using a service. You can use the

    GetCurrentUser

    code snippet in a service to return this information.


    Thanks,

    Saeed



    5-Regular Member
    June 26, 2014

    An alternative to using the snippet is to use the Keyword, principal, to retrieve the user that is executing a particular service.

    1-Visitor
    January 25, 2018

    Could you please provide an example? I would need to determine the user who is logged in via TW View and calling a service in Thingworx.