App role assignment to Azure Entra security groups

Streamlining App Role Setup with Azure Entra: A Step-by-Step Guide

Role-based authorization is crucial for controlling access to resources in many applications. When integrating Azure Entra for authentication, leveraging its built-in app roles capability is a common approach. However, managing role assignments for multiple apps across various environments can be tedious. For instance, a scenario with three apps, three roles, and three environments would require 27 role assignments. This post explores automating the process of adding roles to Azure Entra app registrations primarily using the Azure CLI....

April 7, 2024 · 2 min · LPains
Stopwatch

How to benchmark javascript coding options

There are multiple ways to accomplish the same task in any programming language. Sometimes, it can be challenging to determine the most efficient approach, especially when you’ve performed the task countless times. This is where benchmarking comes in handy. Benchmarking involves comparing different implementations of the same functionality to determine the most efficient one. In this post, I will demonstrate how to benchmark JavaScript code using several popular online tools....

January 27, 2024 · 2 min · LPains
Identity

Azure Pipeline service principal detail without AD Access

Azure Pipelines are a powerful tool for automating CI/CD workflows, and the AzureCLI task allows you to execute scripts using the Azure CLI. When working with service principals, it’s essential to have their client ID, secret, and object ID at hand. While obtaining the client ID and secret is straightforward using the addSpnToEnvironment property, retrieving the object ID can be a bit more challenging. In this blog post, we’ll explore a workaround to easily fetch the object ID for your service principal, even if it doesn’t have direct read access to Azure AD....

July 25, 2023 · 2 min · LPains
Developer VM

Setting up Hyper-V VM using powershell

It is not uncommon in consulting to work out of dedicated VMs for each customer. This helps create a strong segregation between internal and each client workstream. If you use Hyper-V, chances are that you already have a template VM and use copies of it, so you don’t setup everything over and over. In this post, I will do exactly that, but introduce as much automation using PowerShell as possible....

August 28, 2022 · 5 min · LPains
Developer Environment

Automated and repeatable Developer Environment setup - winget

Back in March I posted about Automated and repeatable Environment Setup. In that version of the environment setup, I used Chocolatey because it has always been my go-to Windows app installer. However, the latest versions of Windows 10 and 11 comes with winget pre-installed. In this post, I will show how to setup a similar developer environment but using winget instead of chocolatey. Similarly to the last post, I will focus on a typical ....

August 25, 2022 · 3 min · LPains