Edi Wang

.NET and Azure Developer

Posts in August 2021

How to Get Access Token for Azure REST APIs in .NET

I am recently working on a project that requires front-end to call Azure REST APIs. Microsoft document describes how to get Access Token in postman via Jon Gallant's blog post. However, placing secret keys in front-end is very dangerous. In my project, I must get the Access Token from server side in .NET. Let's see how to do it. …
Azure Azure AD

Log User Identity Information to Azure Application Insights

Azure Application Insights is a very powerful APM tool for monitoring web applications. However, not all features that we sometimes require come out of the box. I now have an ASP.NET Core Web API application that uses JWT authentication. I would like to log user's identity when there is a failed request. Let's see how to do it. …
Azure Application Insight