Category App Service

Implement a Web APP and an ASP.NET Core Secure API using Microsoft Entra ID which delegates to a second API

This article shows how an ASP.NET Core Web application can authenticate and access a downstream API using user access tokens and delegate to another API in Microsoft Entra ID also using user access tokens. Microsoft.Identity.Web is used in all three applications to acquire the tokens afor the Web API and the access tokens for the […]

Using Key Vault certificates with Microsoft.Identity.Web and ASP.NET Core applications

This post shows how Azure Key Vault certificates can be used with Microsoft.Identity.Web in an ASP.NET Core application which requires a downstream “access_as_user” API. The Microsoft Entra ID App Registrations requires a certificate instead of a client secret. Code: https://github.com/damienbod/MicrosoftEntraIDAuthMicrosoftIdentityWeb Posts in this series History 2023-11-28 Updated to .NET 8 Creating the Key Vault certificates […]

Implement Microsoft Entra ID Client credentials flow using Client Certificates for service APIs

This post shows how to implement an Microsoft Entra ID client credential flows to access an API for a service-to-service connection. No user is involved in this flow. A client certificate (Private Key JWT authentication) is used to get the access token and the token is used to access the API which is then used […]

Securing Azure Functions using ME-ID JWT Bearer token authentication for user access tokens

This post shows how to implement OAuth security for an Azure Function using user-access JWT Bearer tokens created using Microsoft Entra ID and App registrations. A client web application implemented in ASP.NET Core is used to authenticate and the access token created for the identity is used to access the API implemented using Azure Functions. […]

Securing Azure Key Vault inside a VNET and using from an Azure Function

This post shows how an Azure Key Vault can be protected inside an Azure virtual network. The deployment is setup so that only applications in the same VNET can access the Key Vault. To implement this, the access to the Key Vault is restricted to the VNET and secondly, the applications accessing the Key Vault […]

Securing Azure Functions using an Azure Virtual Network

In this post, an Azure Function is deployed in a Azure Virtual Network and the access to the Azure Function is restricted so that it cannot be reach from the Internet. Only Applications deployed in the same VNET can access the Azure Functions. Code: https://github.com/damienbod/AzureFunctionsSecurity History Blogs in the series Target Setup The Virtual network […]

Securing Azure Functions using certificate authentication

This article shows how to secure Azure Functions using X509 certificates. The client is required to send a specific certificate to access the Azure Function. Code: https://github.com/damienbod/AzureFunctionsSecurity History Blogs in the series Setup the Azure Function to require certificates A Dedicated (App Service) plan is used, so that certificates can be set to required for […]

Securing Azure Functions using API Keys

This article shows how to secure Azure Functions using API Keys. This is useful, if you have no control over the API client implementation, the client code base cannot be easily changed or the client is not Azure hosted. This should only be used with trusted clients and is for machine to machine usage. Code: […]

Retry Error Handling for Activities and Orchestrations in Azure Durable Functions

Azure Durable Functions provides a rich set of Error Handling APIs. This post shows how Activities or Sub-Orchestrations can be re-run with the different retry options. Activities in a workflow can call an API or run a code flow which might fail due to connection problems, network timeouts or other similar problems. If it was […]

Azure Durable Functions Monitoring and Diagnostics

This post looks at monitoring Azure Durable Functions, highlighting practical techniques and tools that can help ensure reliability and performance. It also demonstrates how diagnostic APIs can be integrated to provide deeper insights into function execution, state management, and error handling, enabling developers to build more resilient and observable workflows. Code: https://github.com/damienbod/AzureDurableFunctions History Posts in […]