Thanks for the assistance @adam, $User is now evaluating to the user account that is accessing the dashboard via web browser. I can now use this variable to query AD based upon who is accessing the dashboard. The following were the final steps that resolved the issue for me:
-
Open “C:\Program Files (x86)\Universal\appsettings.json”
-
Changed Windows Authentication Enabled to “True”
“Authentication” : {
“Windows”: {
“Enabled”: “True”
}, -
Saved and closed appsettings.json
-
Restarted the PowerShell Universal Windows Service
-
Refreshed the dashboard page
-
When accessing the dashboard in a web browser, the user is now prompted to input their credentials. After entering their domain credentials, the dashboard run the rest of the code based on that user account.