question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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

See original GitHub issue

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

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
magarmacommented, Nov 26, 2021

I’ve added a PR for this #532 Let’s see if it’s accepted

0reactions
sympmarccommented, Nov 23, 2021

A little more testing, several states I’ve tested.

As exported (no custom tabs), it fails with the error

                    <pnp:Tabs>
                        <pnp:Tab DisplayName="Wiki" ID="f1d6f6db-e57c-4a17-a703-3d13765a2c83" Remove="false" />
                    </pnp:Tabs>

Adding a OneNote tab makes it succeed.

                    <pnp:Tabs>
                        <pnp:Tab DisplayName="Wiki" TeamsAppId="com.microsoft.teamspace.tab.wiki" Remove="true" />
                        <pnp:Tab DisplayName="OneNote" TeamsAppId="0d820ecd-def2-4297-adad-78056cde7c78" />
                    </pnp:Tabs>

This fails, but silently and the Team isn’t created. It sort of makes sense, since I’ve asked the engine to remove the only tab. (Tested by accident, but maybe still useful?)

                    <pnp:Tabs>
                        <pnp:Tab DisplayName="Wiki" TeamsAppId="com.microsoft.teamspace.tab.wiki" Remove="true" />
                    </pnp:Tabs>
Read more comments on GitHub >

github_iconTop Results From Across the Web

Get-PnPTenantTemplate fails with a Graph call for Teams
Get-PnPTenantTemplate fails with a Graph call for Teams #529 ... "TeamsAppId" Property Missing from Extracted Schema File for Teams. #444.
Read more >
App manifest schema for Teams
The Microsoft Teams app manifest describes how your app integrates into the Microsoft Teams product. Your app manifest must conform to the  ......
Read more >
New-MgTeam (Microsoft.Graph.Teams)
[TeamsAppId <String>] : The ID of the Teams app that is associated with the attachment. The property is specifically used to attribute a...
Read more >
Value of Microsoft.Graph.TeamsTab.TeamsAppId is ...
TeamsAppId is missing in GET call for channel tabs. It was present earlier. The value comes as null. Facing issue since past 3...
Read more >
Configure the built-in tab types in Microsoft Teams
For document library tabs, the teamsAppId is com.microsoft.teamspace.tab.files.sharepoint . The following is the configuration. Property, Type ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found