SharePoint Online: Team site is not responsive

Scenario: My team site is not responsive on mobile devices

  • If you have an existing custom master page, by using Custom Master Page and provision script to apply it
    PnP Example:

    #enable publishing feature on all sites
    $subWebs = Get-SPOSubWebs
    foreach ($web in $subWebs) {
    	Enable-SPOFeature -Identity "94c94ca6-b32f-4da9-a9e3-1f3d343d7ecb" `
                              -Force -Web $web.ServerRelativeUrl
    #Add/update the master page
    Add-SPOMasterPage -SourceFilePath "C:/temp" -Title "master.aspx" `
                      -Description "customer master page" `
                      -DestinationFolderHierarchy "test" -UiVersion 15
    #Apply it on the root site
    Set-SPOMasterPage -MasterPageServerRelativeUrl $MasterPageServerRelativeUrl `
    		  -CustomMasterPageServerRelativeUrl $MasterPageServerRelativeUrl
    #Apply it to all subsites
    $MasterPageServerRelativeUrl = "/_catalogs/masterpage/test/master.aspx"
    $subWebs = Get-SPOSubWebs
    foreach ($web in $subWebs) {
    Set-SPOMasterPage -MasterPageServerRelativeUrl $MasterPageServerRelativeUrl `
                -CustomMasterPageServerRelativeUrl $MasterPageServerRelativeUrl `
      	    -Web $web.ServerRelativeUrl
  • Register Site Action and use jQuery to apply responsive elements: e.g:, but if you already have customized publishing site, you might have to modify the scripts to apply these responsive actions only to certain site templates.
  •     .\Enable-SPResponsiveUI.ps1 -TargetSiteurl ""
  • Using SPMeta2, example code snippet
     public ModelNode GetModel()
           var model = SPMeta2Model.NewWebModel(rootWeb =>
               rootWeb.AddWeb(intranetWebs.TeamSites, web =>
           return model;
    public static class intranetMasterPages
        public static MasterPageSettingsDefinition masterPageSettings = new MasterPageSettingsDefinition
            // both should be site relative URLs
            SiteMasterPageUrl = "/_catalogs/masterpage/Intranet.master",
            SystemMasterPageUrl = "/_catalogs/masterpage/Intranet.master"
  • More(TBA)…

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s