Skip to main content
Announcements
The way to achieve your own success is the willingness to help somebody else. Go for it!
cancel
Showing results for 
Search instead for 
Did you mean: 
patricesalem
Creator II
Creator II

Get User Name in Qlik Sense - SSO connection

Hello

 

I'm trying to retrieve in my app the user name of the current user.

The OSUser() function only returns the userdirectory and the userid.

Is there a way to retrieve the user name as shown in the QMC (or when logged on the hub - at the top left)

 

thanks for your help

ps: we're working with Qlk enterprise Sept. 2019 Patch 1

 
6 Replies
Anil_Babu_Samineni

May be

Subfield(OSUSER(), '\', -1)

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
patricesalem
Creator II
Creator II
Author

Thanks for the answer.
I had already tried your solution but it returns  the AD userid, not the user name.
The Active Directory information logged into the qmc is username, domain, userid

 

thanks

 

patricesalem
Creator II
Creator II
Author

hello again

 

nobody has an idea on how to proceed ?

 

thanks

qliksensedev
Contributor
Contributor

Hi

Do you find any solution for this. Even I am trying to retrieve UserName in Mashup. 

I am able to get UserID with OSUser() function but my requirement to show in MAshup webpage is Username.

If you have already got a solution pls share to us.

 

 

Anil_Babu_Samineni

Try this

SumField(OSUser(), '=', -1)

If not, How it is returning when you use simply OSUSER()

 

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
QlikQlaker
Contributor III
Contributor III

SubField(OSUser(), '=', -1)     --> did have to change from sumfield 😄

 

worked great!!