Hi Spencer YH Cai,
Welcome to Microsoft Community. Thank you for reaching out.
To better assistance, could you please provide details below:
- Is the target group a Microsoft 365 group or a classic SharePoint group? Graph API only supports Microsoft 365 groups.
- Is the groupId valid and resolvable in Microsoft Graph?
- Can you confirm the group exists and the ID is correct?
- Is the userPrincipalName resolvable in Graph?
- Does the user exist and have permissions to be assigned as owner?
- Are you trying to set the owner as a user or another group? Graph API typically supports assigning ownership to users only.
- Is the bearer token scoped correctly?
- Does the token include Group.ReadWrite.All or Directory.ReadWrite.All permissions?
- What type of authentication is used (for example: app-only token)?
- Are you getting any error responses from the PATCH call? → If yes, what is the status code and error message?
- What response are you receiving from the Update Group Owner step? Is it a success code or an error?
- Have you tried using PnP PowerShell to update the group owner? If so, what was the result?
Your detailed response will help us diagnose and resolve the issue more efficiently.
Thank you for your cooperation.
Best regards,
Alex - MSFT | Microsoft Community Support Specialist