Designer can't get username in Perspective

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

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

image

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

1 Like

I'm not sure I'd call that a regression. Have you tried using system.util.getSessionInfo from gateway scope?

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.

1 Like

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!

1 Like

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

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

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

1 Like

So it is good news, it revert back to normal

1 Like

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.

1 Like

This is mine now:

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

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

Is there a mismatch between who you allow to use designer and the projects user source/identity provider? Under gateway config->security->general
image

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.

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

5 Likes

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

5 Likes

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

4 Likes