Using the following rest api resource /_api/web/getuserbyid(1), I can get only the users who already have access to the site.

My problem is that I would like to get the user properties for all users from active directory,whether they have access to the site or not.

is there a way to achieve it? User profile service is not reliable.

1 Answer 1


You can get those details using Microsoft Graph API mentioned below


Below are some helper links based on platform where you want to use Graph API

  • thanks for your post, but I can't use Graph API (company policy) and no c#. It has to be Rest API only. Sep 15, 2022 at 14:18
  • then as per my knowledge there is no other option because you also not able to use user profile service Sep 16, 2022 at 4:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.