Forum Discussion

mischmuc089's avatar
mischmuc089
Copper Contributor
Mar 25, 2025
Solved

Service Bus: Ip has been prevented to connect to the endpoint

Hi

Since yesterday we are facing issues with our Azure Functions (ASP) connecting to the Azure Sevice Bus (Standard, not in VNET). This was working before without any issues and since yesterday it is not working anymore on all our environments so I wonder if there is any general issue.

 

Message: Put token failed. status-code: 401, status-description: Ip has been prevented to connect to the endpoint.For more information see:Virtual Network service endpoints

 

The Azure Functions are communication via Nat Gatway and the public Ip address is set in the IP Filter List of the SBN. 

 

As far as I deactivate the IP filter to allow any traffic, it is working again. I also can see, that the used outbound Ip is exactly the smae which is set in the ip filter list. We are susing the AMQP protocol.

 

[Error] An unhandled exception occurred in the message batch receive loop (namespace='....servicebus.windows.net', entityPath='.../Subscriptions/...', singleDispatch='False', isSessionsEnabled='False', functionId='Host.Functions.ProcessTripsBc').System.UnauthorizedAccessException : Put token failed. status-code: 401, status-description: Ip has been prevented to connect to the endpoint.For more information see:Virtual Network service endpoints:Event Hubs: https://go.microsoft.com/fwlink/?linkid=2044192Service Bus: https://go.microsoft.com/fwlink/?linkid=2044235IP Filters:Event Hubs:  https://go.microsoft.com/fwlink/?linkid=2044428Service Bus: https://go.microsoft.com/fwlink/?linkid=2044183TrackingId:0ac55176-7c9d-4577-bc35-246418724a7d_G0

 

Regards Michael

  • Microsoft Support was able to help me. The rootcasue was a missconfiguration in the Sbunet. We are using the SBN Standard and in the Subnet the Service Endpoint of the SBN was assigned. After removing it, the network was working again. I just wonder why this was not a problem before, the configuration of the subnet was not touched since month. Howerver, If you are using the SBN Standard in combination with Ature Functions in Vnet with or without Nat Gateway, do not assign the Service Endpoint of the SBN to the Subnet as the communication is rotuted over the internet.

1 Reply

  • mischmuc089's avatar
    mischmuc089
    Copper Contributor

    Microsoft Support was able to help me. The rootcasue was a missconfiguration in the Sbunet. We are using the SBN Standard and in the Subnet the Service Endpoint of the SBN was assigned. After removing it, the network was working again. I just wonder why this was not a problem before, the configuration of the subnet was not touched since month. Howerver, If you are using the SBN Standard in combination with Ature Functions in Vnet with or without Nat Gateway, do not assign the Service Endpoint of the SBN to the Subnet as the communication is rotuted over the internet.

Resources