Forum Discussion

3 Replies

  • KotiReddy's avatar
    KotiReddy
    Brass Contributor
    Hellow, Your screenshot is related to Sharepoint which is connected to groups.
    Owners > Refers to group owners to get this you can use get-pnpmicrosoft365group : https://pnp.github.io/powershell/cmdlets/Get-PnPMicrosoft365Group.html#example-7

    Use example 7 to get required data. Mark this as best response if this helps to get required data.
    • buszi99's avatar
      buszi99
      Brass 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's avatar
        KotiReddy
        Brass 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.

Resources