Category Archives: Programming

This operation failed because the QueryInterface call on the COM component for the interface with IID ‘{63EBCF4C-B326-4539-A3CB-B50746D6C323}’ failed

If you’re running a code like this: In a Service Fabric application locally and getting an error: System.InvalidCastException:Unable to cast COM object of type ‘System.__ComObject’ to interface type ‘IInternalFabricClusterManagementClient2’.This operation failed because the QueryInterface call on the COM component for … Continue reading

Posted in Programming | Tagged | 1 Comment

How to get Tenant ID from Subscription ID in Azure using MSAL

This is a series of blog posts: Part 1: using PowerShell Part 2: using ADAL Part 3: using MSAL First you need to install AAD client NuGet package. Note this is MSAL, the modern and recommended way to communicate with … Continue reading

Posted in Programming | Tagged , , | Leave a comment

How to get Tenant ID from Subscription ID in Azure using ADAL

This is a series of blog posts: Part 1: using PowerShell Part 2: using ADAL Part 3: using MSAL In previous part we did it this using a script, this time we’ll do it using C#. First you need to … Continue reading

Posted in Programming | Tagged , , | Leave a comment

How to get Tenant ID from Subscription ID in Azure using PowerShell

This is a series of blog posts: Part 1: using PowerShell Part 2: using ADAL Part 3: using MSAL In order to do this, you’ll need: Call this Azure Resource Manager API without authentication, I suggest always use the latest … Continue reading

Posted in Programming | Tagged , , , | Leave a comment

How to get secret from Key Vault using PowerShell and Managed Identity

First you need to acquire a token using Managed Identity by calling the local Instance Metadata Service (IMDS) endpoint: Note that audience must match the service you’re calling and is different from example calling ARM. Then call the Key Vault … Continue reading

Posted in Programming | Tagged , , | Leave a comment

How to assigned permissions for user-assigned managed identity on multiple subscriptions in bulk

First get the subscriptions you want to assign permissions on: Then get the client id of the identity you to assign permissions for: Now perform the actual permissions assignment: That’s it, folks!

Posted in Programming | Tagged , | Leave a comment

How to use EndpointCertificate with proper ACL for Network Service in Service Fabric

Presentiments: your Service Fabric cluster must be of version 7.1. Since the automatic rollout was postponed, you would need to temporarily switch to the manual mode, select the latest version, and then switch back once the upgrade is complete. To … Continue reading

Posted in Programming | Tagged | Leave a comment

The benefits of using Arrays over Lists in C#

I’m an ardent proponent of using Arrays (T[]) over Lists (Lisf<T>) in C#. In my case, it’s mostly web services running in Azure and libraries, consumed by such services. In this blog post I’ll be collecting the pros and cons … Continue reading

Posted in Programming | Tagged | Leave a comment

How I started using MediatR and then how I stopped

Introduction Today I own the Service Fabric infrastructure piece in my team, to run applications and services written by otherw. But before I wrote a Service Fabric application to deploy other Service Fabric applications, it’s called accordingly – Deployment Service. … Continue reading

Posted in Programming | Tagged , | Leave a comment

Git aliases to combine fetch in the background and checkout/merge/rebase

I decided to write down few useful Git aliases I’m using every day. Or how it looks in .gitconfig:

Posted in Programming | Tagged | Leave a comment