Quote of the Day

more Quotes

Categories

Get notified of new posts

Buy me coffee

All posts in "Azure"

Using MSAL angular to authenticate a user against azure ADB2C via authorization code flow with Proof Key for Code Exchange.

Published March 2, 2023 in Angular , Azure , Azure ADB2C , OAuth2 , OpenID Connect , security - 1 Comment

Previously, I switched from using oidc-client to MSAL Angular to integrate an Angular app with Azure AD for authentication. If you’re interested, you can read more here. More recently, I used MSAL Angular again to connect another application, but this time to an Azure AD B2C tenant. Since I had prior experience and Microsoft provided good documentation and sample projects to follow, connecting to Azure AD B2C using MSAL Angular was not too difficult. In this post, I share how I adapted the sample project provided by Microsoft to integrate the application with our Azure AD B2C tenant and describe a few minor obstacles that I encountered.

Continue reading

Using Azure Application Insights for centralized logging

Published February 1, 2023 in Azure , Logging - 1 Comment

A typical enterprise system usually runs on multiple servers behind a load balancer. The simplest logging option could be logging locally to a location on the server where the app runs. However, this setup makes triaging an issue using the logs difficult. The problem is more prominent if the system consists of multiple applications running on different servers, and the sessions are not sticky. When an error occurs, the developer has to go to the different servers and applications to gather the logs. Even when the developer has gathered all the logs, it may still be challenging to piece together the log events that belong to a same session in a chronological order to troubleshoot the issue.

Continue reading

Building multitenant application – Part 3: Authentication

Published August 20, 2022 in Azure , Azure Active Directory - 0 Comments

In this post, I continue to share what I have learned while building a multitenant application by ultilizing Microsoft Identity Framework and SQL role level security. Specifically, I share what I have learned following Microsoft example project and documentations to make authentication works in a multitenant environment.

Continue reading

Building multitenant application – Part 2: Storing value into database session context from ASP.NET core web API

Published August 13, 2022 in .NET , .NET core , ASP.NET core , Azure SQL database - 0 Comments

In the previous post about row level security in SQL server, I gave an example of reading a value from the database session context to feed into the security function for filtering data. In this post, I show examples of calling the sp_set_session_context store procedure from an ASP.NET core web API to store a value into the session context.

Continue reading

Building multitenant application – Part 1: Multitenant database using Row Level Security

In this and upcoming posts, I’ll be sharing what I have learned while implementing a multi-tenant solution. Specifically, in this post, I share my understanding about Row Level Security in SQL server, and how I have utilized it to host data for multiple organizations in a way that is transparent to the users.

Continue reading

Migrating from Oracle to Azure SQL caveat – prepared statement set string causes implicit conversion

Published June 1, 2022 in Azure , Azure SQL database - 0 Comments

In the previous post, I discuss the issue we face with storing date and time after migrating to azure SQL and the solution. If interested, you can check it out here. In this post, I talk about an issue we encountered with regards to implicit conversion, causing high CPU usage and performance degradation.

Continue reading

Migrating from Oracle to Azure SQL caveat – java.sql.Date does not represent time.

My team recently migrated one of our main database from Oracle to Azure SQL database. In this and upcoming posts, I’m going to share a few things I have learned during the process. Specifically, in this post, I share an issue we ran into with storing date and time, after migrating the schema and data from our Oracle into azure SQL database.

Continue reading

Azure AD authentication in angular using MSAL angular v2 library

In previous projects, I use Oidc-client-js to authenticate users against azure AD. Oidc-client-js is a great library but is no longer maintained by the main author. Because of this, I have switched to MSAL angular v2 in my current project. Microsoft provides good documentation and sample projects to help developers to integrate the library into their project. I am able to follow the sample project to get authentication working in my angular application, albeit a few hiccups along the way. In this post, I share some of the issues I ran into and how I structure the codes for authentication.

Continue reading
1 2 3 4