pnp / pnp/pnpframework

ApplyTenantTemplate does not provide ability to set Group Owner

Open
#534 0 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

I try to apply a new Tenant Template / ProvisioningHierarchy for a TeamSite, which creates a Group and then based on that Group a new Teams Team should be created. The Team itself can't be created right now, because the Group does not have an Owner.

The Owners Property of TeamSiteCollectionCreationInformation is currently not set through ObjectHierarchySequenceSites for TeamSiteCollection. Meaning, it's currently not possible to set the Owner for Team Sites throught the Template - causing all Teams deployments to fail/timeout. (In the retry, an exception is catched, but expected because Group might not be synced yet - the actual error is swallowed)

var provider = new XMLFileSystemTemplateProvider("./templates", string.Empty); var hierarchy = provider.GetHierarchy("SampleTemplate.xml"); tenant.ApplyTenantTemplate(hierarchy, "SAMPLE-SEQUENCE");

SampleTemplate.txt

Would it be possible to provide the Owner thorugh the Template for TeamSites as well?

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 in src/lib/PnP.Framework/Provisioning/ObjectHandlers/ObjectHierarchySequenceSites.cs around line 273, where TeamSiteCollectionCreationInformation is populated, and review SampleTemplate.txt for the TeamSite owner data. Make the template's owner value reach the Owners property for TeamSite and verify that applying the hierarchy can create the Teams Team successfully.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
tooling
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.