
Hi @tamilarasan I,
Thank you for posting your question in the Microsoft Q&A forum.
Based on the information you have provided, it looks like you want to retrieve all site owners information including M365 group.
Firstly, I want to ask that you can only get the information from the Communication Site right? If yes, then I have some thoughts.
When a Team Site is created, an M365 Group is automatically created in the background. This M365 Group itself is considered as the "owner" of the site.
The Primary Admin field often displays the name of the M365 Group rather than a specific user's email address (because it has multiple owners).
To sum up:
- For M365 Group-connected sites (or Team sites), it shows "Group owners" because the M365 Group is the designated owner. The actual owners are the people in that group.
- For standalone sites (Communication sites), it shows the specific individual user who was assigned as the Primary Site Collection Administrator.
- If Primary Admin is shown as "Group Owner", you cannot get the site owner information. Because the group contains many owners, it cannot return to a specific user.
Please correct me if my understanding is wrong. As my testing environment is also returning the same result as yours, which reflects my thought about this.
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.