pnp / pnp/pnpframework

"TeamsAppId" Property Missing from Extracted Schema File for Teams.

Open
#444 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C#
Stars
259
Forks
161
Avg merge
10h 33m
Merged PRs (30d)
1

Description

Reporting an Issue or Missing Feature

Issue

Expected behavior

To be able to extract a Teams configuration from an existing Team and then re-provision from that extracted template.

Actual behavior

Trying to re-provision from an extracted template results in errors:

Invoke-PnPTenantTemplate : The required attribute 'TeamsAppId' is missing.
At line:1 char:1
+ Invoke-PnPTenantTemplate -Path .\sometemplate.xml
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : SyntaxError: (:) [Invoke-PnPTenantTemplate], XmlSchemaValidationException
    + FullyQualifiedErrorId : TEMPLATENOTVALID,PnP.PowerShell.Commands.Provisioning.Tenant.InvokeTenantTemplate

This relates to the "TeamAppId" property missing from the extracted schema for each of the "Tabs" defined. (https://docs.microsoft.com/en-us/graph/teams-configuring-builtin-tabs)

<pnp:Tab DisplayName="WebSite" ID="fdf0fc44-4eca-43e8-b8e1-932f7a60f1f7" Remove="false">
  <pnp:Configuration EntityId="" ContentUrl="https://www.somewebsite.co.uk" RemoveUrl="" WebsiteUrl="https://www.somewebsite.co.uk" />
</pnp:Tab>

needs to be similar to:

<pnp:Tab DisplayName="WebSite" TeamsAppId="com.microsoft.teamspace.tab.web" ID="fdf0fc44-4eca-43e8-b8e1-932f7a60f1f7" Remove="false">
  <pnp:Configuration EntityId="" ContentUrl="https://www.somewebsite.co.uk" RemoveUrl="" WebsiteUrl="https://www.somewebsite.co.uk" />
</pnp:Tab>
Steps to reproduce behavior

Extract a PnP Tenant Template using a configuration file that looks like:

{
    "$schema": "https://aka.ms/sppnp-extract-configuration-schema",    
    "tenant": {
        "teams": {          
            "includeGroupId": false,            
            "includeMessages": false
        }
    },
    "handlers": [
        "Tenant"
    ]
}

Issue the command for the SPO site that supports the Team and save it as an XML schema file::

$template = Get-PnPTenantTemplate -SiteUrl https://m365x123456.sharepoint.com/sites/PROV002 –Configuration "configTeams.json" -AsInstance
Save-PnPTenantTemplate -Force -Template $template -Out sometemplate.xml

Invoke the template:
Invoke-PnPTenantTemplate -Path .\sometemplate.xml

What is the version of the Cmdlet module you are running?

1.7.17 (nightly)

Which operating system/environment are you running PnP PowerShell on?
  • Windows
  • Linux
  • MacOS
  • Azure Cloud Shell
  • Azure Functions
  • Other : please specify

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the Get-PnPTenantTemplate extraction path for Teams tabs, then compare its output with Invoke-PnPTenantTemplate validation. Reproduce the issue using the provided configuration and XML examples. Done means an extracted template includes the required TeamsAppId for each tab and can be invoked without the reported schema error.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.