1

I'm attempting to get site owners via graph.

Documentation indicates this should be possible via /sites/{site-id} via /sites/{site-id}. I'm using beta.

The problem is I'm not even getting a blank owner attribute; I get everything else.

I'm curious if anyone has tried/confirmed this is working or not. I'm also curious if there is an alternate endpoint to retrieve owner info via graph.

2

Yes, I tried this before and by default Site resource does not provide owner property. As of now, by using /sites/{site-id} graph returns only below given properties:

  1. @odata.context
  2. createdDateTime
  3. description
  4. id
  5. lastModifiedDateTime
  6. name
  7. webUrl
  8. displayName
  9. root
  10. siteCollection

However owner property could be retrieved using Site.Drive property. To get the owner property, you need to expand and select the drive property while fetching site information like given below:

https://graph.microsoft.com/beta/sites/{site-id}?$select=*,drive&$expand=drive
3
  • Thanks! that's helpful. I now get a owner & creator return, however, both values are blank
    – Oxossi
    Nov 27 '18 at 16:55
  • When I tried this I was getting the correct name of owner. Nov 27 '18 at 16:57
  • Both that, and /{site-id}/drive/ appear to be pulling the default documents library and attempting to pull the owner of that.
    – Oxossi
    Nov 27 '18 at 17:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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