IronPython Script to display the Spotfire Username against Spotfire Cloud Environment returns a garbled string
book
Article ID: KB0080019
calendar_today
Updated On:
Description
When we run the below IronPython Script in the Spotfire, it is expected to return the logged in user's name.
from System import Environment, Threading username = Threading.Thread.CurrentPrincipal.Identity.Name Document.Properties["username3"] = username
However, If we run this same script against the Spotfire Cloud environment then, it will not return the desired username, instead it return a garbled string as is shown below:
The reason for this is
- The authentication which is used in TIBCO Spotfire Cloud is that of Web Authentication (OpenID Connect) and hence you see this behavior (garbled characters being returned for logged in user name). It is actually the client ID (public identifier) that is returned.
- When you log into Spotfire with the userid which is the email id (from the web) it is internally mapped with the Client ID.
- When we run this script, it is therefore fetching the public Identifier(client ID) which is a garbled string as you can see.
Client ID as can be seen in the screenshot below:
Environment
All Supported OS
Issue/Introduction
IronPython Script to display the Spotfire Username against Spotfire Cloud Environment returns a garbled string
Attachments
IronPython Script to display the Spotfire Username against Spotfire Cloud Environment returns a garbled string
get_app
Feedback
thumb_up
Yes
thumb_down
No