Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
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

 
10 Replies
Anil_Babu_Samineni

May be

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

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
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

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

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

 

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
QlikQlaker
Contributor III
Contributor III

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

 

worked great!!

varajpmc0816
Contributor II
Contributor II

Not working for me. Please provide complete solution

varajpmc0816
Contributor II
Contributor II

thanks working fine with USER ID
Need UserName, how can we do that 

Anil_Babu_Samineni

I could see you have closed thread already, If you need more information regarding the issue please unmark and ask more details.

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful