Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot create shared channel with MembershipType="Shared" #624

Open
khha opened this issue Nov 17, 2023 · 0 comments
Open

Cannot create shared channel with MembershipType="Shared" #624

khha opened this issue Nov 17, 2023 · 0 comments

Comments

@khha
Copy link

khha commented Nov 17, 2023

I try to provision a new Team in MS Teams with Invoke-PnPTenantTemplate. I am using the latest schema and using MembershipType="Shared". When I go to MS Teams I see a normal public channel. I run this script with my global admin account. What is going wrong?

Powershell 7 version: 7.4.0
PnP Powershell version: 2.2.0

Powershell command:

connect-PnPOnline https://myCompany.sharepoint.com/sites/teamify11 -Interactive
Invoke-PnPTenantTemplate -Path "C:\PS\Diversen\template.xml" -Parameters @{"TeamTitle"="PnPTeamDemo";"TeamAlias"="teamify11"}

PnP xml template:

<pnp:Provisioning xmlns:pnp="http://schemas.dev.office.com/PnP/2022/09/ProvisioningSchema"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  Author="KHHA"
  Generator="Human being"
  Version="1.0"
  Description="STAP SharePoint site and MS Teams template for provisioning"
  DisplayName="SharePoint/Teams Provisioning">

  <pnp:Preferences Author="KHHA" Version="1.0" Generator="Human being">
    <pnp:Parameters>
      <pnp:Parameter Key="TeamTitle">Test Team</pnp:Parameter>
      <pnp:Parameter Key="TeamAlias">testteam</pnp:Parameter>
      <!-- <pnp:Parameter Key="CompanyName">Contoso</pnp:Parameter> -->
    </pnp:Parameters>
  </pnp:Preferences>

  <pnp:Templates ID="SAMPLE-TEMPLATES">
    <pnp:ProvisioningTemplate ID="ProjectsTemplate" Version="1.0"
      BaseSiteTemplate="STS#3"
      DisplayName="Test"
      Description="Test"
      Scope="RootSite"
      TemplateCultureInfo="1040">

    </pnp:ProvisioningTemplate>

  </pnp:Templates>

  <pnp:Sequence ID="SAMPLE-SEQUENCE">

    <pnp:SiteCollections>
      <pnp:SiteCollection xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:type="pnp:TeamSite"
        ProvisioningId="TEAM.SITE.01"
        Title="{parameter:CompanyName} Projects"
        Alias="{parameter:TeamAlias}"
        DisplayName="{parameter:CompanyName} Projects"
        IsPublic="true"
        IsHubSite="true"
        Description="{parameter:CompanyName} Projects"
        Classification="MBI"
        Teamify="true"
        HideTeamify="true"
        Language="1033">
        <pnp:Templates>
          <pnp:ProvisioningTemplateReference ID="ProjectsTemplate" />
        </pnp:Templates>
      </pnp:SiteCollection>
    </pnp:SiteCollections>

  </pnp:Sequence>

  <pnp:Teams>

    <pnp:Team GroupId="{sequencesitegroupid:TEAM.SITE.01}"
      DisplayName="{parameter:TeamTitle}"
      Description="STAP project" Visibility="Private" Archived="false"
      MailNickname="{parameter:TeamAlias}">

      <pnp:Channels>

        <pnp:Channel DisplayName="General"
          Description=""
          IsFavoriteByDefault="true">
        </pnp:Channel>

        <pnp:Channel DisplayName="Project Realisation"
          Description=""
          IsFavoriteByDefault="true"
          MembershipType="Shared">
        </pnp:Channel>

      </pnp:Channels>
    </pnp:Team>

  </pnp:Teams>

</pnp:Provisioning>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants