0

I have an Azure App Service running AspNet Core with Web API & WebSockets middleware enabled. Everything works fine when App service authentication is turned OFF.

When Azure AD authentication is turned ON for the App Service, the Web APIs are working fine but WebSocket connections are failing. I am using ADAL.js in the fronted to authenticate the users and set the bearer token in Authorization header for the API calls.

But I am not sure how to set the bearer token while setting up the WebSocket connection. Does anybody know how to achieve this?

Vinod Kumar Y S
  • 628
  • 3
  • 9
  • could you put the code related to setting up the web socket here? – Jay Aug 26 '17 at 04:54
  • 1
    What authentication protocol do u use? – juvchan Aug 27 '17 at 13:25
  • @Vinod Kumar Y S, please take a look at the suggested duplicate and [this](https://stackoverflow.com/questions/22383089/is-it-possible-to-use-bearer-authentication-for-websocket-upgrade-requests). Feel free to open a new question when you tried the approaches described and nothing works. Make sure to include code samples with your code failing. – astaykov Jun 20 '18 at 15:30

0 Answers0