I am trying to connect group to a SharePoint online site using these Add-PnPOffice365GroupToSite, Set-SPOSiteOffice365Group commands and getting below error :
Access denied. You do not have permission to perform this action or access this resource.
Executing these commands with a account which has SP Admin and Exchage admin rights. This error is intermittent and failing few times. When it failed, in the backend the group is getting created but it is not synched with sharepoint.