Member-only story

Connect Azure Functions to SignalR using managed identity

Jorge Freitas
3 min readJul 28, 2023

--

Photo by Wes Hicks on Unsplash

Traditionally, establishing a connection between Azure Functions and SignalR required managing connection strings with sensitive secrets, introducing potential security vulnerabilities and management complexities. However, Microsoft’s introduction of managed identity offers a game-changing solution to this challenge, streamlining the authentication process while bolstering security measures.

Using Managed Identity instead of using a connection string with Accountkey is part of best practices.

What this being said, let’s connect the Azure function to SignalR without any connection string.

The steps are straightforward:

  • Create a Managed Identity for the Azure Function. In my case, I am using a System Assign identity.

Now in my scenario, I have two functions.

Function 1: Negotiate

Function 2: Publish a message SignalR target

Function 1: Negotiate Function

 [FunctionName("negotiate")]
public SignalRConnectionInfo…

--

--

No responses yet