Pass through variables

Product: PowerShell Universal
Version: 2.5.5

Hi,

We currently have an Powershell module, that allows some of our users to update rows in an SQL table containing some form of an CMDB.
When they update an row, we pull their domain\samaccountname, and log this in the SQL table aswell - so that we can see, who have updated the record.

I have searched in the documentation, but havent found anything in PSU, that allows us to pass an variable to our code.
Since we use Tokens for most of our APIs, it would be ideal to have the token passed to our scripts, as an fixed variable - fx “$psu_token” or similar
That would allow us to store the Token in the SQL table, and gaining a bit of the same logging.

In 2.6, you’ll have access to the $ClaimsPrincipal object that should contain the info you’re looking for: Variables - PowerShell Universal It won’t have the entire token but should have all the user info.

I prefer having the user info, instead of the entire token.
Looking forward to 2.6 then :slight_smile: