Skip to content

Adding data location support to Provisioning (Multi-geo location scenario) #643

@luismanez

Description

@luismanez

We have the need to support data location when provisioning. When provisioning Team Sites, as they are created using Graph API, if the tenant has enabled Multi-region, the SharePoint site is created in the default location. PnP Framework allows to create TeamSite in a specific location in some of their methods, like:

UnifiedGroupsUtility.CreateUnifiedGroup(
        displayName: "PnP Team",
        description: "PnP Team",
        mailNickname: "pnp-team",
        accessToken: token,
        preferredDataLocation: PnP.Framework.Enums.Office365Geography.NAM,
        owners: ["peter.k@tenant.onmicrosoft.com"],
        members: ["anna.s@tenant.onmicrosoft.com"],
        groupLogoPath: null
    );

However, when using the PnP Schema, there is no way to pass that preferredDataLocation from the XML to the ObjectHierarchySequenceSites Handler.

We’ve been doing some tests, and we think we can create a Pull Request to add that support (here, and in the PnP Framework repo), but we want to double check first if this repo is still maintained, as it hasn’t changed in 2 years. Also cos the merge requires some coordination between both PnP repos.

Disclaimer: For now, it would only support XML templates (not JSON), only the TeamSite node, and only when Provisioning, not when extracting the template.

Basically the changes are:

  • in the TeamSiteCollection class
Pasted Graphic
  • In the Provisioning handler:
image
  • and then, the XML would be something like:
Pasted Graphic 1

Please, can someone in the PnP Team to confirm they’re happy with us doing the PR?

Many thanks

/cc @PaoloPia @VesaJuvonen @patrick-rodgers (sorry for the direct mention :))

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions