How does the MS Graph “Sites.Selected” permission work for granular permissions for SPO sites?

Pankaj Surti's Blog


To provide granular access for the sites the Azure Access Control (ACS) was used in the past. The app id and secret can be created using the add-ins, more info is described here. Note: Please check ACS retirement info.

Now with the new Sites.Selected MS Graph permission you can use the granular level permission. This blog post is just to simplify and demonstrate the use of PnP PowerShell to create granular permissions.

For example, if the customer wants to have access to a few sites as a read permissions the “Site.Selected” permission techniques can be used to meet the need.

Step by Step Solution

Step # 1 Create Azure AD app with MS Graph Sites.FullControl.All permission

NOTE: Make sure you select MS Graph not SharePoint, as it also has the same permission but that is not valid.

Please make a note of the application id.


View original post 401 more words

Swooping into Site Designs

Bob German's Vantage Point

A few months ago a group of SharePoint MVPs gathered to film a new kind of reality TV show and remake a company’s Intranet. You may have seen it – SharePoint Swoop!

This is a story from behind the scenes,in which I got to make their work reusable with SharePoint Site Designs and Scripts. It was quite a thrill to be involved, even though I wasn’t there in person! I’ll start with the story, then dig into the details of Site Designs and Scripts.

View original post 659 more words

Building SharePoint Site Designs with Themes and Azure Functions

Bob German's Vantage Point

This article is the sequel to Swooping into SharePoint Site Designs, in which I related my experience working behind the scenes on the world’s first SharePoint reality show! This time I’ll explain the code so you can build similar solutions if you so desire.

The sample shows how to build a site design and script for a simple department site, as created in the SharePoint Swoop video. A team of experts worked to redesign an Intranet site in just three days. This site design was developed behind the scenes to provide a template for all the company’s department sites.

View original post 1,741 more words

Start Developing in OfficeJS Today with Script Lab

Recently, I have been working with a tool from Microsoft Garage which allows you to quickly develop OfficeJS projects in Word, Excel and PowerPoint. It is called Script Lab. You can find more information about it here:

Script Lab

It is also in GitHub project. You can read about it here:

To install Script Lab, open Word, Excel or PowerPoint and on the Insert tab, click Store.


Type “script lab in” the search box and hit enter. Then select Script Lab from the list and click Add.


Once added, you will see a new Script Lab tab. From there, you click the Code button to open the task pane.


This tool comes with a lot of options:

  • If you click the hamburger menu you will see an option to Sign Into GitHub. This will allow you to create Gist’s and access and save code snippets to GitHub.

View original post 628 more words

Updating the Item Properties Displayed on a Nintex Workflow Task


By default, certain Nintex workflow task forms include an Item Properties panel that displays all the metadata and certain SharePoint columns for an item in a list/library . Since there could be a long list of columns, you can actually limit the columns that are displayed in the Item Properties panel. Here are the steps:

  1. Go to the list/library that the workflow applies to.
  2. Open and modify the “Workflow Task View”. If that view does not exist, then create it with that exact name.
  3. Add or remove the desired column fields, then click OK to finish.
  4. The Item Properties panel on workflow tasks for that specific list/library will now display the column fields in the Workflow Task View.
  5. Notes:
    • The “Workflow Status” column will always be the first item in the Item Properties panel.
    • Any list/library view has to have at least one column in the view, so the…

View original post 10 more words

SharePoint 2013 Visual WebPart .g.cs files not being generated /Updated by Visual Studio 2012

TechNet Team

1.Navigate Visual Webpart.

2. Right Click on VisualWebPart1UserControl.ascx file and click on  Properties.

3.if  VisualWebPart1UserControl.g.cs is present then delete it first.

4.Go To Custom Tool Text box on properties window and  type “SharePointWebPartCodeGenerator” keyword and press enter. then it

automatically generate background file forcefully(VisualWebPart1UserControl.g.cs).


View original post

When setting the MySiteHostUrl I get a UserProfileApplicationNotAvailableException

Bram de Jager - Architect, Speaker, Author

When I’m trying to set the MySiteHostUrl via PowerShell it throws an error. Taking a closer look it seems after initializing the UserProfileManager class an UserProfileApplicationNotAvailableException is raised.

The exception you receive is

New-Object : Exception calling “.ctor” with “1” argument(s): “UserProfileApplicationNotAvailableException_Logging :: UserProfileApplicationProxy.ApplicationProperties ProfilePropertyCache does not have 458839b6-4979-413a-a7a3-41d8564faea3”

The PowerShell script I’m using is retrieving the current context and initializing the UserProfileManager object. This should provide me access to the MySiteHostUrl.

Add-PSSnapin Microsoft.SharePoint.PowerShell -ea $site= Get-SPSite “” $context= Get-SPServiceContext($site) $upm= New-Object -TypeName Microsoft.Office.Server.UserProfiles.UserProfileManager -ArgumentList $context$upm.MySiteHostURL = “”

The solution to this is providing the account running the PowerShell script sharing permissions “Full Control” on the User Profile Service Application.

  • Open Central Administration
  • Click Service Applications
  • Select “User Profile Service Application”
  • Click in ribbon the Permissions button
  • Add…

View original post 21 more words

Change order of user profile properties in SharePoint 2013 with Powershell

Radu Tut

Management of user profile properties in SharePoint CA user interface is easy and intuitive, but when it comes to changing the display order of user profile properties, this becomes a difficult and frustrating task (and it has been like this since 2007). Powershell scripting proves again very handy.

You can find several other blog posts on this topic, but all I have found use the obsolete SharePoint API (2007) to do this.

First of all we need a PS script to list the current order of user profile properties.

Next step would be to set up a configuration xml file, that lets us define what properties we want to change. The following config sample will change the display order of two user profile properties.

The final step, the PS script that makes the changes. The function for update requires two input parameters: a config file path, and the my site url.

View original post 116 more words

ASP.NET MVC5 and DataTables

Thanks to Stack Overflow

In BundleConfig.cs I added the following lines:

        bundles.Add(new ScriptBundle("~/bundles/jquery").Include(

        bundles.Add(new ScriptBundle("~/bundles/datatables").Include(

In _Layout.cshtml I added the following to the head tag:

<link href="~/Content/jquery.dataTables.css" rel="stylesheet" type="text/css"/>
<link href="~/Content/jquery.dataTables_themeroller.css" rel="stylesheet" type="text/css" />

Finally, at the bottom of Index.cshtml is the call to the script:

    $(document).ready( function () {
    } );
For DataTables to work, the <thead> is compulsory and <tbody> is optional. When you are going to add the <thead> tag, its better to add the <tbody> tag also