Identity in App is always System

Product: PowerShell Universal
Version: 5.1.2

I installed the new release (previous used 4.5.0) and have an issue within my app now. I am using the variable $UAJob.Identity.Name to get the username of the logged in user who is running the script in the app. (I need this to get a stored apikey in the variables for an authentication to another tool.)

In version 4 I had no problem with this, but now the $UAJob.Identity.Name is always “System” instead of the logged in user.

Is this related to the already fixed issue “System would show in the permission identity selector (#4040)” which should have been fixed in 5.0.16 from 11/18/2024 ?

Thanks

Are you using integrated security or something else for the cmdlets?

I am not sure what you mean, but I did not define anything special, so I think I am using integrated security :smiley:
In my settings is written:

SecurityEnvironment = "PowerShell 7"

like it is my default environment.

Ok thanks. Let me try some stuff on my end and circle back. It sounds like a bug, but hopefully, I can provide a workaround or root cause.

1 Like

I can reproduce this, and it will be resolved in 5.2.

1 Like