AspNetCore.TestHost + Azure Active Directory (Part II)

So in my last post on the topic, I was describing some challenges I faced when receiving 401 not authorized errors when attempting to pass a seemingly correct bearer token to my Azure Active Directory protected WebAPI. I’ve discovered the solution. Not only was I able to get it working but it also works flawlessly … Continue reading AspNetCore.TestHost + Azure Active Directory (Part II)

AspNetCore.TestHost + Azure Active Directory (Part I)

I have been evaluating new practices for implementing Integration Testing WebAPIs and I’ve been trying to use TestHost to test a WebAPI that I have secured with Azure Active Directory. I am able to use PostMan to obtain a bearer token from Azure AD's oauth2/token endpoint and call HTTP GET on '/api/Values'. However, when I … Continue reading AspNetCore.TestHost + Azure Active Directory (Part I)