Forum Discussion
buszi99
May 17, 2024Brass Contributor
Get site owers
Hi, I want to get site owners for all sites in SPO. How to make it. I don't want to get users in "XXX site owners" but these owners Do you know how to make that? Best regards, Kamil
buszi99
May 20, 2024Brass Contributor
Hello, when I try to get this via HTTP request to GRAPH API i get users group called "Owners XXX site", but when i go to 1st tab from screemshot i see 2 users not gruoup. I want to get these 2 users.
KotiReddy
May 21, 2024Brass Contributor
can you share which request you are using.
As long as we use any query to pull site owners it gives group name becuase it is connected to group. You must use group member graph API: https://learn.microsoft.com/en-us/graph/api/group-list-members?view=graph-rest-1.0&tabs=http
Group Id you can get from site properties.
As long as we use any query to pull site owners it gives group name becuase it is connected to group. You must use group member graph API: https://learn.microsoft.com/en-us/graph/api/group-list-members?view=graph-rest-1.0&tabs=http
Group Id you can get from site properties.