question

haribanshgupta-0955 avatar image
0 Votes"
haribanshgupta-0955 asked ryanchill edited

My applications are deployed in Azure Webapps now I would like to capture logon user name, logon access timestamps, Duration, Failed logons...

My applications are deployed in Azure Webapps now I would like to capture below details-

Logon user name, logon access timestamps, Duration, Failed logons...


Tried- I have enabled Application Insights in Azure but still I could not able to see those details

What should be the best approach without redeploying the application.
Is there any options in azure portal blade where I can collect ?
Inside- Usages Blade I saw the Users but I can see only user Id not user name.

azure-webappsazure-monitor
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

ryanchill avatar image
0 Votes"
ryanchill answered haribanshgupta-0955 commented

Enable diagnostics logging for apps in Azure App Service, specifically sending logs to Azure Monitor, is a doc covering the various methods for capturing logging information. Sending logs to Azure Monitor will allow you to query AppServiceHTTPLogs. Application Insights Auto-instrumentation on the other hand, currently works with select frameworks out of the box and captures certain telemetry. Either method should capture failed requests.

Having said that, there isn't any feature in the Azure Portal that will allow you to easily collect login information. Since you're specifically looking for logon information, that type logging will be determined by the authentication method you selected. It's possible that the login information isn't in the header and furthermore, that particular header is not captured in the raw web server logs.

Capturing this information is to log it yourself. I would add console log tracing when a user successfully logs in, logs out, or fails to login. This would require adding the necessary code and redeploying the app. I'm not sure if your concern about not redeploying the app is centered around not being able to alter the code, but this would be the best course of action.

· 3
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

@ryanchill Thanks for sharing the details. If there were no way
I will try to add console log tracing when a user successfully logs in, logs out, or fails to login.
If you have any links for add console log tracing please share with me.

I have angular UI app and Web API Services


Thanks

0 Votes 0 ·