To create a O365 group for the Existing site(STS#3) using app id and app secret RRS feed

  • Question

  • I have tried running the below commands in the power shell It is throwing error only.

    Connect-PnPOnline -Url "SiteURL" -AppId "a04bccf6-7e5f-49f9-9838-ef929f83c653" -AppSecret "App secret value"  

    Add-PnPOffice365GroupToSite -Url "SiteURL" -Alias "April61e" -DisplayName "April61e"

    It throwing the error as “Add-PnPOffice365GroupToSite :

    {"odata.error":{"code":"Authorization_RequestDenied","message":{"lang":"en","value":"Insufficient privileges to

    complete the operation."},"requestId":"b5c18291-f4b0-4da7-acf6-cae3219b8644","date":"2020-04-09T09:25:35"}}”

    The App has "group.readwriteall" permission

    • Edited by Raja Priya Thursday, April 16, 2020 9:27 AM
    Thursday, April 16, 2020 7:03 AM

All replies

  • Try with the below sample code and let us know, what do you get.

    Connect-PnPOnline -Url "https://spadmin.xxxxxxxxx.com" -Credentials $UserCredential
    Add-PnPOffice365GroupToSite -Url "portal.xxxxxxxxx.com/sites/05UCProjectTeamDebug" -Alias "05UCProjectTeamDebug" -DisplayName "05UCProjectTeamDebug" -KeepOldHomePage -ErrorAction Stop

    Below article has some valuable information about this, Seems like we were able to run this for default tenant URL only after 3/14.


    Thanks & Regards,

    sharath aluri

    Thursday, April 16, 2020 10:31 AM
  • In the admin center, expand Groups, and then click Groups.

    Select Add a group.

    On the Choose a group type page, select Office 365, and select Next.

    On the Basics page, type a name for the group, and, optionally, a description. Select Next.

    On the Edit settings page, type a unique email address for the group, choose a privacy option and whether you want to add Microsoft Teams, and then selectNext.

    On the Owners choose the name of one or more people who will be designated to manage the group. Anyone who is a group owner will be able to delete email from the Group inbox. Other members won't be able to delete email from the Group inbox. Select Next.

    After reviewing your settings and making any changes, select Create group.

    Select Close.
    Thursday, April 16, 2020 11:06 AM
  • Thank you . It worked
    Monday, April 20, 2020 3:36 PM