Tag Archives: Azure

Using multiline Parameters for Aspire and ASP.NET Core with user secrets and Azure default deployments

Multiple line secrets or configuration do not work in Aspire per default. An example of this is using a PEM file for certificates. This posts shows how the multiple line configuration parameters can be setup in Aspire, ASP.NET Core and works with user secrets and Azure default deployments. Code: https://github.com/swiss-ssi-group/swiyu-passkeys-idp-loi-loa Adding an base64 encoding layer […]

Implement SAML as an external provider in an ASP.NET Core Identity application using Duende as an OIDC server

This article shows how to implement a SAML federation from an ASP.NET Core Identity application using Sustainsys.Saml2.AspNetCore2. Entra ID is used to implement the SAML authentication and the users can authenticate from the tenant. Code: https://github.com/damienbod/DuendeEntraSaml Setup Three components are used to implement this demo, a web application that authenticates using OpenID Connect, an ASP.NET […]

Aspire Azure SQL deployment bug

This week, I was updating my Aspire applications after the latest release and I ran into a deployment bug for my test deployments. I could no longer deploy the database to Azure SQL. I got the following error: The error is caused by the latest Azure changes and the Aspire updates. To fix, I need […]

Using configurable token lifetimes in Microsoft Entra ID, .NET and Microsoft Graph

Configurable token lifetimes in the Microsoft identity platform went GA and I thought I would look at implementing this using a .NET console application using Microsoft Graph . This article looks at implementing this with an delegated user credential as well as an application client credential. Code: https://github.com/damienbod/EntraIdTokenLifeTimePolicies The code example was initially created using […]

Remove sign-up from Entra External ID user flows

This article shows how to remove the sign-up flow from Entra External ID user flows. This is required because SMS and Phone validation can be abused by bots to run up costs on the tenant. The bots create accounts and start a phone validation or a SMS validation which is charged to the tenant. The […]

Invite Guest users in a Entra ID Multi-tenant setup

This post looks at implementing a guest user invite in a cross tenant setup. This is useful when creating partner tenants using an Entra ID MAU license for all partner guests and members. This makes it possible to keep the home tenant separated for internal members. Setup The Partners or guest Entra ID tenant is […]

Implement a secure MCP OAuth desktop client using OAuth and Entra ID

The article demonstrates how to implement a secure MCP OAuth desktop client using Microsoft Entra ID. The MCP server is built with ASP.NET Core and secured using Microsoft Entra ID. The MCP client is a .NET console application that must acquire an OAuth access token to interact with the MCP server. Code: https://github.com/damienbod/McpSecurity Setup A […]

Implement a secure MCP server using OAuth and Entra ID

The article shows how to implement a secure model context protocol (MCP) server using OAuth and Entra ID. The MCP server is implemented using ASP.NET Core and uses Microsoft Entra ID to secure the API. An ASP.NET Core application using Azure OpenAI and semantic kernel is used to implement the MCP client for the agent […]

Reset Cookies and force new sign-in using ASP.NET Core Identity

This post looks at implementing a cookie reset in an ASP.NET Core application using Duende identity server which federates to Entra ID. Sometimes cookies need to be reset for end users due to size problems, or unknown remote authentication server errors. The cookies can be cleared and a new sign in can be forced. Code: […]

Issue and verify credentials using the Swiss Digital identity public beta, ASP.NET Core and .NET Aspire

This post shows how to issue and verify identities (verifiable credentials) using the Swiss Digital identity and trust infrastructure, (swiyu), ASP.NET Core and .NET Aspire. The swiyu infrastructure is implemented using the provided generic containers which implement the OpenID for Verifiable Credential Issuance and the OpenID for Verifiable Presentations standards as well as many other […]