Use service tags for Azure SignalR Service
You can use Service Tags for Azure SignalR Service when configuring Network Security Group. It allows you to define inbound/outbound network security rule for Azure SignalR Service endpoints without need to hardcode IP addresses.
Azure SignalR Service manages these service tags. You can't create your own service tag or modify an existing one. Microsoft manages these address prefixes that match to the service tag and automatically updates the service tag as addresses change.
Note
Starting from 15 August 2021, Azure SignalR Service supports bidirectional Service Tag for both inbound and outbound traffic.
Use service tag on portal
Configure outbound traffic
You can allow outbound traffic to Azure SignalR Service by adding a new outbound network security rule:
Go to the network security group.
Click on the settings menu called Outbound security rules.
Click the button + Add on the top.
Choose Service Tag under Destination.
Choose AzureSignalR under Destination service tag.
Fill in 443 in Destination port ranges.

Adjust other fields according to your needs.
Click Add.
Configure inbound traffic
If you have upstreams, you can also allow inbound traffic from Azure SignalR Service by adding a new inbound network security rule:
Go to the network security group.
Click on the settings menu called Inbound security rules.
Click the button + Add on the top.
Choose Service Tag under Source.
Choose AzureSignalR under Source service tag.
Fill in * in Source port ranges.
Adjust other fields according to your needs.
Click Add.