Graph API - Daemon Web 404 Error

Youngjoo Yang 26 Reputation points
2021-07-19T11:02:10.657+00:00

Dear Any,

I am testing the Java project I downloaded from https://github.com/Azure-Samples/ms-identity-java-daemon/archive/master.zip.
The sample program is working well, from which the used url is "https://graph.microsoft.com/v1.0/user".

But when I change the url to https://graph.microsoft.com/v1.0/users/admin@acbconfroom.onmicrosoft.com/contacts,
it has the error like this "Connection returned HTTP code: 404 with message: Not Found".
(admin@acbconfroom.onmicrosoft.com is my Azure AD email.)

Of course, I've added Contacts.Read and Contacts.ReadWrite as API permissions for changed url, and then they are Granted for my API.

I want to know it is possible to access the changed url(https://graph.microsoft.com/v1.0/users/admin@acbconfroom.onmicrosoft.com/contacts)
as a background service without sign in.

Please give me some hint or solution to access this url!!!

FYI, I succeeded in accessing this url in the graph-explorer.

Best regards,
Y.J.Yang

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
10,663 questions
Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
19,581 questions
{count} votes

Accepted answer
  1. Ryan Hill 25,981 Reputation points Microsoft Employee
    2021-07-19T20:04:28.247+00:00

    Hi @Youngjoo Yang ,

    I've updated the tags on your question to get more visibility. By no means am I an expert on Graph but to answer your question, you should be able to access a user's contacts.

    Since using the userPrincipalName in the Graph Explorer was successful, have you tried using actual user's id to see if that works. If that's not successful, then it's either the delegate permissions of your app registration or scope variable used to generate the token. Verify in jwt.io that the token has the appropriate scopes.


1 additional answer

Sort by: Most helpful
  1. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.


    Comments have been turned off. Learn more