{"action":"created","issue":{"url":"https://api.github.com/repos/Azure-Samples/active-directory-java-graphapi-web/issues/4","repository_url":"https://api.github.com/repos/Azure-Samples/active-directory-java-graphapi-web","labels_url":"https://api.github.com/repos/Azure-Samples/active-directory-java-graphapi-web/issues/4/labels{/name}","comments_url":"https://api.github.com/repos/Azure-Samples/active-directory-java-graphapi-web/issues/4/comments","events_url":"https://api.github.com/repos/Azure-Samples/active-directory-java-graphapi-web/issues/4/events","html_url":"https://github.com/Azure-Samples/active-directory-java-graphapi-web/issues/4","id":198928114,"number":4,"title":"Getting Message \"Insufficient privileges to complete the operation\" for all operations on users","user":{"login":"adarsh2570","id":10286703,"avatar_url":"https://avatars.githubusercontent.com/u/10286703?v=3","gravatar_id":"","url":"https://api.github.com/users/adarsh2570","html_url":"https://github.com/adarsh2570","followers_url":"https://api.github.com/users/adarsh2570/followers","following_url":"https://api.github.com/users/adarsh2570/following{/other_user}","gists_url":"https://api.github.com/users/adarsh2570/gists{/gist_id}","starred_url":"https://api.github.com/users/adarsh2570/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adarsh2570/subscriptions","organizations_url":"https://api.github.com/users/adarsh2570/orgs","repos_url":"https://api.github.com/users/adarsh2570/repos","events_url":"https://api.github.com/users/adarsh2570/events{/privacy}","received_events_url":"https://api.github.com/users/adarsh2570/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2017-01-05T10:54:47Z","updated_at":"2017-01-24T07:30:35Z","closed_at":null,"body":"I have setup the entire code as detailed in the guide. However when I hit the \"All Users\" api I get the following error message : Error:Authorization_RequestDenied! Insufficient privileges to complete the operation. {\"odata.error\":{\"code\":\"Authorization_RequestDenied\",\"message\":{\"lang\":\"en\",\"value\":\"Insufficient privileges to complete the operation.\"}}}  \r\n\r\nThis is the log I get in tomcat: org.sampleapp.exceptions.SampleAppException: Insufficient privileges to complete the operation.\r\n\r\nI have given all permissions through API access to my application in Azure portal under \"Required permissions\". Any idea why I might be getting this error?"},"comment":{"url":"https://api.github.com/repos/Azure-Samples/active-directory-java-graphapi-web/issues/comments/274729564","html_url":"https://github.com/Azure-Samples/active-directory-java-graphapi-web/issues/4#issuecomment-274729564","issue_url":"https://api.github.com/repos/Azure-Samples/active-directory-java-graphapi-web/issues/4","id":274729564,"user":{"login":"Walk4Muscle","id":14989270,"avatar_url":"https://avatars.githubusercontent.com/u/14989270?v=3","gravatar_id":"","url":"https://api.github.com/users/Walk4Muscle","html_url":"https://github.com/Walk4Muscle","followers_url":"https://api.github.com/users/Walk4Muscle/followers","following_url":"https://api.github.com/users/Walk4Muscle/following{/other_user}","gists_url":"https://api.github.com/users/Walk4Muscle/gists{/gist_id}","starred_url":"https://api.github.com/users/Walk4Muscle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Walk4Muscle/subscriptions","organizations_url":"https://api.github.com/users/Walk4Muscle/orgs","repos_url":"https://api.github.com/users/Walk4Muscle/repos","events_url":"https://api.github.com/users/Walk4Muscle/events{/privacy}","received_events_url":"https://api.github.com/users/Walk4Muscle/received_events","type":"User","site_admin":false},"created_at":"2017-01-24T07:30:35Z","updated_at":"2017-01-24T07:30:35Z","body":"Have you check the permissions on your AAD application against to microsoft graph api? According the document of [List Users](https://graph.microsoft.io/en-us/docs/api-reference/v1.0/api/user_list), we need one of following permission in scope:\r\n>User.ReadBasic.All; User.Read.All; User.ReadWrite.All; Directory.Read.All; Directory.ReadWrite.All; Directory.AccessAsUser.All\r\n\r\nYou can refer to https://graph.microsoft.io/en-us/docs/authorization/permission_scopes to match the permission name to the scope name."}}
{"actor":{"display_login":"Walk4Muscle"}}