PnP-Provisioning-Schema icon indicating copy to clipboard operation
PnP-Provisioning-Schema copied to clipboard

Create Shared Channels in Teams with "Share this channel with everyone on the team" true/false

Open McoreD opened this issue 2 years ago • 4 comments

Hi @PaoloPia thanks for adding Shared Channels support at https://github.com/pnp/PnP-Provisioning-Schema/issues/591

However, we are trying to automate the following:

image

To implement the effect of the checkBox in the screenshot, there does not seem to be a way.

I look forward to receiving your advice.

McoreD avatar Jun 01 '23 05:06 McoreD

On a related note, I tried the following this morning:

All the channels marked for Shared, ended up being created as Standard. Not sure why.

<pnp:Provisioning xmlns:pnp="http://schemas.dev.office.com/PnP/2022/09/ProvisioningSchema"
                  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                  xsi:schemaLocation="http://schemas.dev.office.com/PnP/2022/09/ProvisioningSchema https://raw.githubusercontent.com/PnP/PnP-Provisioning-Schema/master/PnP.ProvisioningSchema/ProvisioningSchema-2022-09.xsd">

  <pnp:Teams>
    <pnp:Team DisplayName="{parameter:TeamPrefix}-{parameter:ProjectNumber}-{parameter:ProjectAbbreviation}-{parameter:TeamSuffix}"
      Description="IDD Project team for {parameter:ProjectName}"
      HiddenGroupMembershipEnabled="true"
      Visibility="Private"
      MailNickname="{parameter:TeamPrefix}-{parameter:ProjectNumber}-{parameter:ProjectAbbreviation}-{parameter:TeamSuffix}">

      <!-- Member Settings -->
      <pnp:MembersSettings AllowCreateUpdateChannels="false"
        AllowCreatePrivateChannels="false"
        AllowDeleteChannels="false"
        AllowAddRemoveApps="false"
        AllowCreateUpdateRemoveTabs="false"
        AllowCreateUpdateRemoveConnectors="false" />

      <!-- Message Settings -->
      <pnp:MessagingSettings AllowUserEditMessages="true"
        AllowUserDeleteMessages="false"
        AllowOwnerDeleteMessages="false"
        AllowTeamMentions="true"
        AllowChannelMentions="true" />

      <!-- Guest Settings -->
      <pnp:GuestSettings AllowCreateUpdateChannels="false"
        AllowDeleteChannels="false" />

      <!-- Security -->
      <pnp:Security AllowToAddGuests="true">
        <pnp:Owners ClearExistingItems="true">
          <pnp:User UserPrincipalName="[email protected]" />
        </pnp:Owners>
      </pnp:Security>

      <pnp:Channels>
        <!-- Standard Channels -->
        <pnp:Channel DisplayName="Communications"
          Description=""
          IsFavoriteByDefault="true" />
       <pnp:Channel DisplayName="Develop"
          Description=""
          IsFavoriteByDefault="true" />
        <pnp:Channel DisplayName="Meetings"
          Description=""
          IsFavoriteByDefault="true" />
        <pnp:Channel DisplayName="Program"
          Description=""
          IsFavoriteByDefault="true" />

        <!-- Private and Shared Channels -->
        <pnp:Channel DisplayName="Commercial"
          Description=""
          IsFavoriteByDefault="true"
          MembershipType="Shared" />
        <pnp:Channel DisplayName="OnSite"
          Description=""
          IsFavoriteByDefault="true"
          MembershipType="Shared"  />
        <pnp:Channel DisplayName="Procurement"
          Description=""
          IsFavoriteByDefault="true"
          MembershipType="Shared" />
        <pnp:Channel DisplayName="Evaluation-Commercial"
          Description=""
          IsFavoriteByDefault="false"
          MembershipType="Private" />
        <pnp:Channel DisplayName="Evaluation-Qualitative"
          Description=""
          IsFavoriteByDefault="false"
          MembershipType="Private" />
      </pnp:Channels>
    </pnp:Team>
  </pnp:Teams>

</pnp:Provisioning>

McoreD avatar Jun 03 '23 06:06 McoreD

Added screenshot to support my post above: You can see "Commercial" channel is created as a Standard channel although it is set to Shared in the XML. Monosnap Project_Team xml — Mrwa Teams Procurement Deployment 2023-06-05 13-05-32

McoreD avatar Jun 05 '23 05:06 McoreD

Hi @McoreD, I ran into the same issue, any chance you resolved this?

svenspointofview avatar Sep 19 '23 09:09 svenspointofview

Hi @McoreD, I ran into the same issue, any chance you resolved this?

Unfortunately not yet. I believe the developers need to support this for it to work.

McoreD avatar Sep 19 '23 13:09 McoreD