Skip to Main Content
Spotfire Ideas Portal
Status Future Consideration
Product Spotfire
Categories API
Created by Guest
Created on Jan 18, 2023

expose API to get current user's identify

Please expose API to get current user's identify (username, display name, domain ,etc )

  • Attach files
      Drop here to upload
    • Guest
      Reply
      |
      Mar 8, 2023

      This can be done with below IronPython script.

      Please flag this as already existed. Thank you.


      from Spotfire.Dxp.Framework.ApplicationModel import UserContext

      user=Application.GetService[UserContext]()

      print 'Username: ' + user.Username

      print 'DisplayName: ' + user.DisplayName

      print 'Domain: ' + user.Domain # not sure why this returns nothing instead of "SPOTFIRE" for OOTB database authentication.

      print 'Groups: ' + ','.join(user.Groups)