I have an Azure Static Web App and App Insights running using the standard set of telemetry code found here: https://github.com/Microsoft/ApplicationInsights-JS#snippet-setup-ignore-if-using-npm-setup
I am wondering how I can get the user details using my AAD-protected website? My website generates authentication information that an individual can access by tacking on /.auth/me
to the end of the website URL, which looks like, and I am wondering if this is possibly a way to do it.
{
"clientPrincipal": {
"identityProvider": "aad",
"userId": "xxxx",
"userDetails": "xxxx",
"userRoles": [
"authenticated",
"anonymous"
]
}
}
In related posts, this thread seems fairly related to my interests but I cannot make much of anything from the discussion: Azure - App Insights - how to track the logged-in Username in Auth Id?
I assume that you want user id details using your AAD-protected website .
Here are the steps to know the user ID
and details:
Go to Application insight > View Application Insights data.
Go to users > Click on View more insights
After scroll down to select as below
As Selected Authentication user ID > Click on User Timeline to check the details of USER.
For more information Please refer this similar So thread.