I would just like to ask if there is an ARM template function that can get the Azure SignalR connection string.
you can use listKeys() function:
listkeys(resourceId('Microsoft.SignalRService/SignalR', 'resourceName'), 2018-10-01)
https://learn.microsoft.com/en-us/azure/azure-resource-manager/resource-group-template-functions-resource#list