Nov 01 2020 08:33 AM - edited Nov 01 2020 08:36 AM
Hi,
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.
This is my complete command in PNP
Add-PnPOffice365GroupToSite -Url $siteURL -DisplayName $GroupDisplayName -Alias $MailNickName -Description $GroupDescription -KeepOldHomePage
The same tried with CSOM and getting the same access denied error intermittently
tenant.CreateGroupForSite("https://purnam.sharepoint.com/sites/abc1235", "abc1235 ", "abc1235", false, gcParams);
Does any one know what could be the issue.? Is there any other alternative to connect the group to SPO site.?
Thanks
Purna