Fixing 403 Error with Azure Traffic Manager and gRPC Endpoint

GitaraniSharma-MSFT 49,651 Reputation points Microsoft Employee
2024-08-01T13:36:53.72+00:00

How can I resolve a 403 error when using Azure Traffic Manager with a gRPC endpoint, while the connection works fine when directly using the container app?

PS - Based on common issues that we have seen from customers and other sources; we are posting these questions to help the Azure community.

Azure Traffic Manager
Azure Traffic Manager
An Azure service that is used to route incoming network traffic for high performance and availability.
127 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. GitaraniSharma-MSFT 49,651 Reputation points Microsoft Employee
    2024-08-01T13:37:13.5966667+00:00

    The 403 error occurs due to a misconfiguration in the Azure Traffic Manager setup. Azure Traffic Manager is a DNS-based load balancer that directs traffic to your services. When using Traffic Manager with a gRPC endpoint, you must ensure that the Traffic Manager endpoint uses the default domain of the container app and not the custom domain.

    To resolve this issue:

    1. Configure the CNAME record for your gRPC service domain (e.g., grpc.contoso.co) to point to the Traffic Manager domain (e.g., grpc.trafficmanager.net).
    2. Set up a TXT record for the container app's custom domain validation.
    3. Ensure that the Traffic Manager endpoint is configured with the default domain of the container app, not the custom domain.

    By following these steps, you should be able to eliminate the 403 error and successfully use Traffic Manager with your gRPC endpoint.

    References:

    Please do not forget to "up-vote" wherever the information provided helps you, as this can be beneficial to other community members.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.