Share via

Request_ResourceNotFound

Anonymous
2019-09-06T07:12:30+00:00

I am unable to hit HTTP request API for "https://graph.microsoft.com/v1.0/me/users",

"https://graph.microsoft.com/v1.0/me/onenote/notebooks",

"https://graph.microsoft.com/v1.0/me/onenote/pages"

I am successfully connected to Microsoft account and I am getting a valid access token.

**NOTE:** I am using the MSAL library and trying to make HTTP callout from JavaScript.

function callMSGraph(theUrl, accessToken, callback) {

var xmlHttp = new XMLHttpRequest();

xmlHttp.onreadystatechange = function () {

if (this.readyState == 4 && this.status == 200)

callback(JSON.parse(this.responseText));

}

xmlHttp.open("GET", theUrl, true); // true for asynchronous

xmlHttp.setRequestHeader('Authorization', 'Bearer ' + accessToken);

xmlHttp.send();

console.log('>>>access token :' + accessToken);

var URL = https://graph.microsoft.com/v1.0/me/users;

testOneNote(URL, accessToken);

}

function testOneNote(theUrl, accessToken) {

var xmlHttp = new XMLHttpRequest();

xmlHttp.onreadystatechange = function () {

if (this.readyState == 4 && this.status == 200) {

//callback(JSON.parse(this.responseText));

console.log('>>>Inside api function',JSON.parse(this.responseText));

}

}

xmlHttp.open("GET", theUrl, true); // true for asynchronous

xmlHttp.setRequestHeader('Authorization', 'Bearer ' + accessToken);

xmlHttp.send();

}

"error":

"code": "Request_ResourceNotFound",

"message": "Resource 'users' does not exist or one of its queried

reference-property objects are not present.",

Moved from:

Microsoft 365 and Office | OneNote | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

1 answer

Sort by: Most helpful
  1. Anonymous
    2019-09-06T22:28:56+00:00

    Hi Developer (developer),

    Regarding your concern, I highly suggest that you post your concern in MSDN forum pageto get the appropriate resolution and support regarding this matter. This can help you get the most qualified pool of respondents and other partners who regularly read the forums.

    Should you have any other concern, don't hesitate to post back in the community.

    Was this answer helpful?

    0 comments No comments