# Designer can't get username in Perspective

**URL:** <https://forum.inductiveautomation.com/t/designer-cant-get-username-in-perspective/79958>\
**Category:** Ignition Early Access\
**Tags:** perspective\
**Created:** [October 3, 2023, 4:40am UTC](https://forum.inductiveautomation.com/t/designer-cant-get-username-in-perspective/79958 "2023-10-03T04:40:06Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![nader.chinichian](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nader.chinichian/32/9261_2.png) [@nader.chinichian](https://forum.inductiveautomation.com/u/nader.chinichian)\
**Post date:** [October 3, 2023, 4:40am UTC](https://forum.inductiveautomation.com/t/designer-cant-get-username-in-perspective/79958/1 "2023-10-03T04:40:06Z")

</div>

In the older version of Ignition, I can simply get info about the user who is login into the designer by accessing "session.auth.user.userName". But in 8.1.31 this property is always null in the designer environment.  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/6/7/67ea3e5ca5e9397e691d134a14f8bcc8b84f8b86.png)

Also calling system.perspective.getSessionInfo() returns the username for the designer unauthenticated!!!

![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/7/3/73ac1e06ff37a6b1a853d46d2d020ec62aa854b9.png)

We are using it to track the hours we spend on projects.

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/c/8/c89ab03f5ccebb1b860028a09fe79c85b0cd8a4e.png)

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [October 3, 2023, 11:51am UTC](https://forum.inductiveautomation.com/t/designer-cant-get-username-in-perspective/79958/2 "2023-10-03T11:51:51Z")

</div>

I'm not sure I'd call that a regression. Have you tried using [system.util.getSessionInfo](https://docs.inductiveautomation.com/display/DOC81/system.util.getSessionInfo) from gateway scope?

---

<div class="post-metadata">

**Author:** ![nader.chinichian](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nader.chinichian/32/9261_2.png) [@nader.chinichian](https://forum.inductiveautomation.com/u/nader.chinichian)\
**Post date:** [October 3, 2023, 3:25pm UTC](https://forum.inductiveautomation.com/t/designer-cant-get-username-in-perspective/79958/3 "2023-10-03T15:25:48Z")

</div>

It was okay in the older version that is why I call it regression.  
Yes, I use it and the result is the same. The username field is unauthenticated.

---

<div class="post-metadata">

**Author:** ![ynejati](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/ynejati/32/6093_2.png) [@ynejati](https://forum.inductiveautomation.com/u/ynejati)\
**Post date:** [October 5, 2023, 4:32pm UTC](https://forum.inductiveautomation.com/t/designer-cant-get-username-in-perspective/79958/4 "2023-10-05T16:32:28Z")

</div>

Hey, Nader. Sorry to hear. Can you provide more details to help us replicate the issue? Feel free to DM me if you're more comfortable doing that. Thanks!

---

<div class="post-metadata">

**Author:** ![nader.chinichian](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nader.chinichian/32/9261_2.png) [@nader.chinichian](https://forum.inductiveautomation.com/u/nader.chinichian)\
**Post date:** [October 5, 2023, 4:45pm UTC](https://forum.inductiveautomation.com/t/designer-cant-get-username-in-perspective/79958/5 "2023-10-05T16:45:34Z")

</div>

Hi @ynejati,

It is easy to replicate. I noticed this problem in 8.1.31 but it may happen in the previous version as well. But let's target 8.1.32. if you open Designer and go to Perspective session all properties of "session.auth.user" are set to null. In the older version, these properties are set correctly for the user who logs into the designer session.  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/6/7/67ea3e5ca5e9397e691d134a14f8bcc8b84f8b86.png)

So to get a username and roles I decided to call System.perspective.getSessionInfo() and match session.id with the return array but again this function also returns username unauthenticated!!!  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/7/3/73ac1e06ff37a6b1a853d46d2d020ec62aa854b9.png)

---

<div class="post-metadata">

**Author:** ![cmallonee](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/cmallonee/32/6416_2.png) [@cmallonee](https://forum.inductiveautomation.com/u/cmallonee)\
**Post date:** [October 5, 2023, 7:42pm UTC](https://forum.inductiveautomation.com/t/designer-cant-get-username-in-perspective/79958/6 "2023-10-05T19:42:33Z")

</div>

Curious. I'm not seeing this same behavior in 8.1.33 (nightly).

 ![Screenshot 2023-10-05 at 12.42.19 PM](https://us1.discourse-cdn.com/inductiveautomation/original/3X/c/e/ce68b338c12b5176337b8d21d6ed6509f49900c0.png)

---

<div class="post-metadata">

**Author:** ![nader.chinichian](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nader.chinichian/32/9261_2.png) [@nader.chinichian](https://forum.inductiveautomation.com/u/nader.chinichian)\
**Post date:** [October 5, 2023, 7:43pm UTC](https://forum.inductiveautomation.com/t/designer-cant-get-username-in-perspective/79958/7 "2023-10-05T19:43:57Z")

</div>

So it is good news, it revert back to normal

---

<div class="post-metadata">

**Author:** ![michael.flagler](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/michael.flagler/32/26272_2.png) [@michael.flagler](https://forum.inductiveautomation.com/u/michael.flagler)\
**Post date:** [October 5, 2023, 7:52pm UTC](https://forum.inductiveautomation.com/t/designer-cant-get-username-in-perspective/79958/8 "2023-10-05T19:52:33Z")

</div>

I have a few servers I checked to see if I saw the issue on, and versions 8.1.20, 8.1.31, and 8.1.32 show authenticated and a user ID and userName just fine.

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/5/5/55810ead6458522d60f473372d4fcd4c62766773.png)

---

<div class="post-metadata">

**Author:** ![nader.chinichian](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nader.chinichian/32/9261_2.png) [@nader.chinichian](https://forum.inductiveautomation.com/u/nader.chinichian)\
**Post date:** [October 5, 2023, 7:58pm UTC](https://forum.inductiveautomation.com/t/designer-cant-get-username-in-perspective/79958/9 "2023-10-05T19:58:05Z")

</div>

This is mine now:

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/d/a/dae019099e9d42c0b847b4e4425610281a93dab8.png)

---

<div class="post-metadata">

**Author:** ![victordcq](https://avatars.discourse-cdn.com/v4/letter/v/f6c823/32.png) [@victordcq](https://forum.inductiveautomation.com/u/victordcq)\
**Post date:** [October 6, 2023, 7:48am UTC](https://forum.inductiveautomation.com/t/designer-cant-get-username-in-perspective/79958/10 "2023-10-06T07:48:40Z")

</div>

Seems like for some reason you arent getting authenticated. Nothing in the logs of failed login/auth?

---

<div class="post-metadata">

**Author:** ![nader.chinichian](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nader.chinichian/32/9261_2.png) [@nader.chinichian](https://forum.inductiveautomation.com/u/nader.chinichian)\
**Post date:** [October 6, 2023, 2:06pm UTC](https://forum.inductiveautomation.com/t/designer-cant-get-username-in-perspective/79958/11 "2023-10-06T14:06:45Z")

</div>

> [@victordcq](#):
>
> failed

No, I cant find anything and this happened only in my designer.(not runtime)

---

<div class="post-metadata">

**Author:** ![bkarabinchak.psi](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bkarabinchak.psi/32/83567_2.png) [@bkarabinchak.psi](https://forum.inductiveautomation.com/u/bkarabinchak.psi)\
**Post date:** [October 6, 2023, 4:58pm UTC](https://forum.inductiveautomation.com/t/designer-cant-get-username-in-perspective/79958/12 "2023-10-06T16:58:47Z")

</div>

Is there a mismatch between who you allow to use designer and the projects user source/identity provider? Under gateway config-\>security-\>general  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/4/d/4d61e264d90dea016b7e58a4a20ff0b2cd4be03f.png)

is this a different user source/Identity provider than what the project has? I wonder if that would have something to do with it. You hypothetically could be logging into designer as user who does not exist in the project's user source/identity provider and maybe that's why the null?

Did you make any other changes in the gateway or project properties besides upgrading?

Edit: Ignore this. I have this sort of setup, one user source for designer and another for the project itself and my username is still coming through correctly.

---

<div class="post-metadata">

**Author:** ![nader.chinichian](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nader.chinichian/32/9261_2.png) [@nader.chinichian](https://forum.inductiveautomation.com/u/nader.chinichian)\
**Post date:** [October 6, 2023, 5:37pm UTC](https://forum.inductiveautomation.com/t/designer-cant-get-username-in-perspective/79958/13 "2023-10-06T17:37:25Z")

</div>

Thanks this solves my problem.  
The problem is I use Idp but it seems someone by mistake made the designer permission role field empty.

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/a/b/ab51ffe1aa65a5cb9adfb3ab95d26b54e48acd0d.png)

---

<div class="post-metadata">

**Author:** ![bkarabinchak.psi](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bkarabinchak.psi/32/83567_2.png) [@bkarabinchak.psi](https://forum.inductiveautomation.com/u/bkarabinchak.psi)\
**Post date:** [October 6, 2023, 5:38pm UTC](https://forum.inductiveautomation.com/t/designer-cant-get-username-in-perspective/79958/14 "2023-10-06T17:38:06Z")

</div>

Ha wow and I thought I gave a wrong solution. Better to be lucky than good sometimes!

---

<div class="post-metadata">

**Author:** ![ynejati](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/ynejati/32/6093_2.png) [@ynejati](https://forum.inductiveautomation.com/u/ynejati)\
**Post date:** [October 6, 2023, 9:52pm UTC](https://forum.inductiveautomation.com/t/designer-cant-get-username-in-perspective/79958/15 "2023-10-06T21:52:47Z")

</div>

Glad you got it figured out. Nicely done @bkarabinchak.psi 👏

---

<div class="post-metadata">

**Author:** ![ynejati](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/ynejati/32/6093_2.png) [@ynejati](https://forum.inductiveautomation.com/u/ynejati)\
**Post date:** [December 4, 2023, 10:11pm UTC](https://forum.inductiveautomation.com/t/designer-cant-get-username-in-perspective/79958/17 "2023-12-04T22:11:00Z")

</div>

Closed on December 4, 2023, 10:11pm UTC


