Share via

Azure Queue - Authentication failed

André Kervella 21 Reputation points
2022-01-06T08:36:58.273+00:00

Hello,
I use Azure QueueClient, it work on my workstation.

When it was deployed with the same credentials, I get an exception AuthenticationFailedException when I tried ReceiveMessagesAsync()... .

(creation of object QueueClient doesn't return any exception)

Have you any idea to find the reason (proxy, url, firewall, ...) ?

Azure Service Bus
Azure Service Bus

An Azure service that provides cloud messaging as a service and hybrid integration.

0 comments No comments

Answer accepted by question author

MayankBargali-MSFT 71,016 Reputation points Moderator
2022-01-10T05:29:29.197+00:00

@André Kervella If the connection string is the same as you have confirmed in both the environment then the only reason you will get AuthenticationFailed exception is if you have enabled the virtual network setting on your premium service bus namespace. Please make sure if you have enabled the selected network then you should add the IP address of your consumer application or it should be part of the virtual network in case if you have added any. Please verify it and let me know if you still observe the same behavior.

Updated:
In the scenario where you are using azure active directory authentication and authorization where it returns an OAuth 2.0 token and if you are using any proxy in between then you need to make sure that https://login.microsoftonline.com is allowed in your proxy server as your it redirected to https://login.microsoftonline.com/common/oauth2/v2.0/authorize as mentioned in the here. Thanks, @André Kervella for sharing the resolution for this scenario.

Was this answer helpful?

0 comments No comments

1 additional answer

Sort by: Most helpful
  1. André Kervella 21 Reputation points
    2022-01-10T16:35:15.323+00:00

    we found the solution, we are using a proxy. we have a OAuth2 error.
    we need to allow access to https://login.microsoftonline.com

    Was this answer helpful?


Your answer

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