I am trying to access sharepoint web api (https://myTenant.sharepoint.com/_api/web/lists) with an access token, that I've successfully received from https://login.microsoftonline.com/myTenant/oauth2/v2.0/token. I receive 401 code in response with {"error_description":"Exception of type 'Microsoft.IdentityModel.Tokens.AudienceUriValidationFailedException' was thrown."} Inside the response headers I have this staff: x-ms-diagnostics: 3000003;reason="Invalid audience Uri 'api://XXXXXXXXXXXXXX/'.";category="invalid_client"
I've created new app in sharepoint site and published it. It seems to me that some configuration between azure application and sharepoint are missing. Please help me!