I'm struggling with an authentication issue between an MVC app and a Azure Mobile App.
The MVC app calls the Mobile App login end https:<api>/.auth/login/microsoftaccout?post_url_login=location
That all works, the Mobile app calls Live to authenticate and redirect all the way back to the MVC app works fine.
On the MVC site, any <a>
links that point at the api authorise and return results as expected. But using an httpclient within a controller fails with a 401.
When I look at the trace and the Azure Mobile App log, clicking the <a>
link I see an AppServiceAuthSession
cookie added to the Request Header. The Httpclient trace does not have this.
How do I get the HttpClient to act the same way as if clicking an <a>
link?