In Blogs, Mavention Make, Techblog

With Mavention Make it’s possible to deploy Office 365 groups and modify the SharePoint site that comes with this group. By using Site Provisioning you can stay in control and enforce a consistent configuration of your Office 365 groups. Applying a set of commmen used document librarys on those groups it becomes easier for users to find their way regardless of the project they are working on.

Template

There are three xml files needed to deploy a Office 365 group and make adjustments on the SharePoint site of the Office 365 group. The files needed are:

  • playlist.xml
  • xml to deploy the Office 365 group
  • xml to make adjustments on the SharePoint site of the Office 365 group

You can use the exact examples in this blog post to have a working template. The files are also attached as a zip, Create an Office 365 Group with Mavention Make.zip.

playlist.xml

The playlist tells Mavention Make which files to use for the configuration. In the example below the xml to deploy the Office 365 group is called “group.xml”. The xml to make adjustments on the SharePoint site of the Office 365 group is called “make-configuration-main.xml”.

In the playlist you will notice a RetryCount and a RetryDelay. This is needed since we don’t know in advance how much time is needed by Office 365 to deploy the SharePoint site of the Office 365 group. If your tenant needs more time you can adjust these setting in the playlist.

<?xml version="1.0" encoding="utf-8" ?>
<Configurator xmlns="http://schemas.mavention.com/SharePoint/Apps/SiteConfigurator">
  <Providers>
    <Provider NodeName="Playlist" Class="Mavention.SharePoint.SiteConfigurator.Providers.PlaylistProvider" Assembly="Mavention.SharePoint.SiteConfigurator"/>
  </Providers>
  <Playlist RetryCount="2" RetryDelay="30000">
    <Files>
      <ConfigurationFile FileName="group.xml" FileType="Graph" Requeueable="False" />
      <ConfigurationFile FileName="make-configuration-main.xml" FileType="Make" Requeueable="True" />
    </Files>
  </Playlist>
</Configurator>

group.xml

This template deploys the Office 365 group.

<Configurator xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.mavention.com/Graph/Make">
  <Providers>
    <Provider NodeName="Graph" Class="Mavention.Make.Engine.Providers.GraphProvider" Assembly="Mavention.Make.Engine, Version=1.0.0.0, Culture=neutral, PublicKeyToken=a43c589e76ba4e3d"/>
  </Providers>
  <Graph>
    <Groups>
      <Group DisplayName="{Title}" Description="{Title}" MailNickname="{mailNickName}" Visibility="{security}" >
        <Owners>
          <User UserPrincipalName="{owner}"></User>
        </Owners>
        <Members>
          <User UserPrincipalName="{owner}"></User>
          <User UserPrincipalName="{member}"></User>
        </Members>
      </Group>
    </Groups>
  </Graph>
</Configurator>

make-configuration-main.xml

This template is needed to make adjustments on the SharePoint site of the Office 365 group. Be sure to leave the setting “DenyAddAndCustomizePages=”Disabled”” as is, otherwise you won’t be able to make adjustments on the SharePoint site.

<?xml version="1.0" encoding="UTF-8"?>
<Configurator
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xmlns="http://schemas.mavention.com/SharePoint/Apps/SiteConfigurator">
  <Providers>
    <Provider NodeName="Site" Class="Mavention.SharePoint.SiteConfigurator.Providers.SiteProvider" Assembly="Mavention.SharePoint.SiteConfigurator, Version=1.0.0.0, Culture=neutral, PublicKeyToken=a43c589e76ba4e3d"/>
  </Providers>
  <Site Title="{Title}" Url="{url}" Template="STS#0" LCID="1033" OwnerLogin="{owner}" ObjectAction="Update" SharingCapability="ExternalUserSharingOnly" DenyAddAndCustomizePages="Disabled">
    <RootWeb Url="" Title="{Title}" Template="STS#0" LCID="1033">
      <Properties>
        <Property Name="WebTemplate">ProjectSite</Property>
        <Property Name="WebTemplateVersion">1.0.0.0</Property>
      </Properties>
      <Lists>
        <List Url="external-documents" Title="External documents" TemplateType="101" TemplateFeatureId="00bfea71-e717-4e80-aa17-d0c71b360101" OnQuickLaunch="true" />
      </Lists>
    </RootWeb>
  </Site>
</Configurator>

Properties

The following properties can be used as metadata for the playlist.

Name: playlist.xml
Title: Group
Configuration version: 1.0.0.0
Description: Group
Start object type: Tenant
Parameters: see json

Json

An example of how the json could look like.

{
  "d": {
    "parameters": [{
      "id": "Title",
      "title": "Group Title",
      "inputType": "text",
      "required": true,
      "sampleValue": "A new group"
    },
    {
      "id": "mailNickName",
      "title": "Mailbox",
      "inputType": "text",
      "required": true,
      "sampleValue": "anewgroup"
    },
    {
      "id": "url",
      "title": "Url",
      "inputType": "text",
      "required": true,
      "sampleValue": "https://tenant.sharepoint.com/sites/Mailbox"
    },
    {
      "id": "owner",
      "title": "Group Owner",
      "inputType": "text",
      "required": true,
      "sampleValue": "a.noniem@exact.onmicrosoft.com"
    },
    {
      "id": "member",
      "title": "Member of group",
      "inputType": "text",
      "required": false,
      "sampleValue": "a.noniem@exact.onmicrosoft.com"
    },
    {
      "id": "security",
      "title": "Group Visibilty",
      "inputType": "text",
      "required": true,
      "sampleValue": "Public or Private"
    }]
  }
}

Make request

An example of how the Make request could look like.

{
  "Id": "c2a42711-e2c8-4aec-8610-1b9f3d9d0953",
  "RequestType": 0,
  "ConfigurationFileUrl": "https://mavdemo.sharepoint.com/sites/make-admin/Make%20Configurations/Group/playlist.xml",
  "ConfigurationItemUrl": "https://mavdemo.sharepoint.com",
  "Scope": "Tenant",
  "OverwriteIfExists": false,
  "Parameters": {
    "Title": "A new group",
    "mailNickName": "anewgroup",
    "url": "https://mavdemo.sharepoint.com/teams/anewgroup",
    "owner": "wim@mavdemo.onmicrosoft.com",
    "security": "Public"
  }
}

Vul je zoekopdracht in.