I am currently working on a project that has a web API back end that is authenticated using Azure Active Directory, and I am consuming that back end service from an Android mobile app. To cut a long story short, I have registered a client app in Azure AD and granted it all the permissions to the web API service.
From the Android app I cant get the access token which shows that I am able to log in using Azure AD. The problem is that I get an authorization error whenever I try to invoke the service calls using the access token.
When I test the service on Postman, I am able to successfully hit the service locally, but after publishing to Azure, I get an authorization error when I try to invoke the service calls. It worries me that locally it works properly and it doesn't on Azure.
What could be the possible solution to this?