I'm making a web application to call Office365 REST API, and is using the authentication function of Azure AD. I am not having any progress since last week, and we suddenly got this error:
statuscode: 403,
body: '{"error":{"code":"ErrorAccessDenied","message":"Access is denied. Check credentials and try again."}}
Here is the request that I sent
var request = {
url: url,
method: method,
json: (method === constants.GET || method === constants.DELETE) ? null : resource,
headers: {
'Authorization': credentials.tokenType + ' ' + credentials.accessToken,
'User-Agent': clientId,
'Accept' : 'application/json'
}
Could anyone explain how to fix this?