Wednesday, January 10, 2018

SharePoint Online Site Design

If you were thinking of creating templates in Office 365 for SharePoint online, it has staring to become available in Office 365 which is still in preview.
Is this SharePoint PnP Site Provisioning?
No. This is an alternate way of creating templates and creating new instances of sites.

What is site design?
It provides you with reusable lists, pages, layouts, themes and custom actions. In another way it’s a predefined template to create new instances of their sites. The template is collection of actions specified in a JSON script. In execution of the script, each item is actioned.
Once the JSON Script is designed, it must be registered in SharePoint. Then the template is will be available to the users to create new instances.

Make sure you have installed SharePoint Online Management Shell and you know how to connect to SharePoint Online using PowerShell.

JSON schema
As I mentioned earlier, site design is a set of actions where each action is specified by a verb value. Some actions do have sub actions based on the complexity. Refer to the JSON schema reference. Shown below is the base structure of the JSON script.

   "$schema": "schema.json",  
     "actions": [  
       <your actions goes here>  
     "bindata": { },  
     "version": 1  

I will create one List called "Customer Tracking List". List template reference and Field type reference will be helpful to select the base types. You can see the main action "createSPList" and the sub actions "SetDescription" and "addSPField".

 $site_script = @'  
  "$schema": "schema.json",  
    "actions": [  
        "verb": "createSPList",  
        "listName": "Customer Tracking",  
        "templateType": 100,  
        "subactions": [  
            "verb": "SetDescription",  
            "description": "List of Customers and Orders"  
            "verb": "addSPField",  
            "fieldType": "Text",  
            "displayName": "Customer Name",  
            "isRequired": false,  
            "addToDefaultView": true  
            "verb": "addSPField",  
            "fieldType": "Number",  
            "displayName": "Requisition Total",  
            "addToDefaultView": true,  
            "isRequired": true  
            "verb": "addSPField",  
            "fieldType": "User",  
            "displayName": "Contact",  
            "addToDefaultView": true,  
            "isRequired": true  
            "verb": "addSPField",  
            "fieldType": "Note",  
            "displayName": "Meeting Notes",  
            "isRequired": false  
      "bindata": { },  
  "version": 1  

Currently site design has a few more actions; add and remove fields and content types, set custom field formatting using JSON, add navigation links, apply a theme a site logo, joining a Hub Site and triggering a Flow. Still Site design is in preview, lets hope there will be more actions added in the future.

Once the JSON script is ready, we need to add the script and create a new site design which is a two step process.

Add Script
 C:\> Add-SPOSiteScript -Title "Create Project Site" -Content $site_script -Description "Creates lists for managing projects"  

Create Site design
 Add-SPOSiteDesign -Title "Contoso Project Management" -WebTemplate "64" -SiteScripts "4a2ef0f9-a1dd-48a1-8703-e73300418eb6" -Description "Peoject management template"  
You need to provide the ID returned from the Add-SPOSiteScript to the Add-SPOSiteDesign cmdlet.

Log in to your SharePoint Online tenant and go to the home page of your SharePoint site. Click "Create Site" and you will be able to see the newly added template.

Once the site is created, it will execute the script call the actions to proceed with the customization.
refer to the link for more info and updates.

Monday, June 19, 2017

Experience the Microsoft Forms Preview

Microsoft recently released the Microsoft Forms for the tenants that are in "First Release". Product is still in Preview. Navigate to Microsoft Forms site in your browser. You can use as well. 

If you have no clue what Microsoft Forms is;
"With Microsoft Forms, you can create surveys, quizzes, and polls, and easily see results as they come in. When you create a quiz or form, you can invite others to respond to it using any web browser, even on mobile devices. As results are submitted, you can use built-in analytics to evaluate responses. Form data, such as quiz results, can be easily exported to Excel for additional analysis or grading."

Microsoft strongly says "Microsoft Forms is not a replacement for Microsoft InfoPath" :) 

Lets give it a try...
If you have not signed in already, sign in to your Office 365 account.
Clicking on New Form will allow you to create a Form of your choice. Enter a name and an optional meaningful description. The start adding your questions.

You get to select the type of the answer and based on it the template for your question will be arranged.

I've selected "Choice" and shown below is how the question will be arranged. I added the possible answers and I have the option of adding the choice "Other" as well.

Based on the text you type, it will suggest the type of answers. Well, of course it's for Choices ;)

This is how it looks when you select a Date type

You are allowed to select long answers as well. Where it will adjust the size of the text area.

Once you are done creating your form, you can preview how it looks in a computer and in a mobile device. Yes, it's mobile compatible :)

And you are allowed to change the theme as well.

Sharing is made easy with a click of a button.

What I like the most is, how how you can see the feedback. Clicking on the "Responses" you can see the analytics page.

And my wish is "Let Forms replace InfoPath in the near future, with all the rich features" :)

Tuesday, January 17, 2017

File upload failed to SharePoint Online Style Library

I was changing the look and feel of a SharePoint online Team Site. So I needed to upload a few CSS, JS and ASPX files. I tried through the browser and got the below error. “The documents cannot be uploaded because different permissions are needed. Request the necessary permissions.” At the same time I was trying through SPD as well. But the same result with a different error message “Access Denied”. These errors have nothing to do with the Site Collection / Site level permissions.


Well, Googling, I figured that enabling custom scripts in admin center will do the job. In your Office 365 admin center, go to SharePoint Admin Center and select Settings. There you will see the “Custom Script”, where you can enable it for personal sites and self-service created sites. But the catch is, it’s gonna take 24 hours to take effect.


The Custom Script feature enables or disables scripting capabilities on SharePoint Online personal sites and self-service sites. Because self-service site creation points to your tenant’s root site collection by default – you’re actually applying the scripting capability to your tenant’s root site collection. If you don’t want this and instead want to enable or disable scripting on another site collection, you can point the self-service site creation root to another valid site collection in Office 365.

To enable scripting on a particular site collection immediately, use the following PowerShell command
Set-SPOsite <SiteURL> -DenyAddAndCustomizePages 0

There’s a lot more info about it in the below url.

Monday, October 3, 2016

Collab365 – Azure Notification Hub

I’ll be speaking at the largest online conference for SharePoint, Office 365 and Azure which is Collab365 Global Conference 2016. It’ll take place on 19th to 20th October with 121 online sessions.


Session title: Azure Notification Hub

Session overview:
Do you have a need to send notifications to thousands or millions of users at once who use different devices on different platforms? Azure notification hub is the best answer. Azure Notification Hubs provide an easy-to-use, multiplatform, scaled-out push infrastructure that enables you to send mobile push notifications to any mobile platform. With Notification Hubs you can easily send cross-platform, personalized push notifications, abstracting the details of the different platform notification systems (PNS). With a single API call, you can target individual users or entire audience segments containing millions of users, across all their devices. In this session I will cover the basics of Azure Notification Hub, configuration, building an application to send and receive notification and customizing your notifications with different templates.

What you will learn:

  • Basics of Azure Notification Hub
  • Need of Windows App Developer account
  • Configuring Notification Hub
  • Send and receive notifications
  • Customize notifications with Payload templates

For registration link.

Tuesday, September 27, 2016

Feature pack 1 for SharePoint Server 2016

What is a feature pack?
As Microsoft says “Unlike previous versions of SharePoint, release-to-manufacture (RTM) did not define the end of innovation, but the beginning. As we continue to develop SharePoint Server 2016, we’ve paid close attention to customer feedback, trends in content management, team collaboration, user experiences across devices, and how the cloud can be blended into existing on-premises scenarios in new and compelling ways. Feature Packs allow us to accelerate delivery of cloud-first features to our Software Assurance customers (where noted) of SharePoint Server 2016 outside of the traditional 2- to 3-year release cadence.”

Microsoft has SharePoint Online the cloud version and SharePoint Server the on-premises version. Keeping on-premises version up to date with the online version is a real challenge. Bringing the demanding features of online version to the on-premises version on time is a tough job. But today Microsoft announced the Feature Pack 1 for SharePoint Server 2016. It brings the enhancements including,

  • Logging of administrative actions performed in Central Administration and with Windows PowerShell.
  • Enhancements to MinRole to support small environments.
  • A new OneDrive for Business user experience.
  • Custom tiles in the SharePoint app launcher.
  • Unified auditing across site collections on-premises and in Office 365.
  • Unified taxonomy across on-premises and Office 365.
  • OneDrive API 2.0.

This will be available in November 2016. For more information please read link.

Thursday, May 12, 2016

Error: EACCES: permission denied, access '/usr/local/lib/node_modules'

If you are wondering what I'm up to these days by setting up Node, npm in a Mac. Well I'm preparing my Mac for SharePoint development. Specifically Apps using client side libraries and scripts.

I'm trying to install Yeoman through the terminal application in Mac and ended up getting the below error.

Error: EACCES: permission denied, access '/usr/local/lib/node_modules'

Though I use Mac, I'm a hardcore Windows user and do my development in Windows and mainly Microsoft technologies. So this error is new to me. Read quite a few blogs to find the correct method to resolve the issue and below is my finding.

Its a permissions issue in the home directory. I need to reclaim the ownership of the npm directory.

sudo chown -R ReplaceWithUserName ~/.npm

Also I need the write permission in to node_modules directory:
sudo chown -R ReplaceWithUserName /usr/local/lib/node_modules

This sorted my issue installing Yeoman.

Wednesday, May 11, 2016

Installing Node.js on OS X El Capitan

I'm new to Node.js. Currently all I know about Node is that it is an asynchronous event driven JavaScript runtime which is designed to build scalable network applications as the official Node site says. All I'm trying to do right now is to setup Node in my Mac and thought of sharing my experience with the community.

To install Node.js, you need to go to the where you can download a pre-compiled binary package which is easy to install. I'm going for version 6 with latest features.

You can install the package from the downloaded dmg file. The installation wizard will install Node.js and the npm (Node Package Manager) which is the default package manager for Node.js. Well, this 14MB downloaded file will take nearly 47MB of installation space from your machine. Completion of the installation, check whether the /usr/local/bin is added to your path. Type echo $PATH is the terminal.
As mentioned above, check the path.
Next step is to test the installation as shown below.
You can even check the version of node with the command node -v

This is my first step with Node, along way to go.