Notes from Collaboration Summit 2018 conference

Few days ago I was on European Collaboration Summit 2018 conference – one of the biggest Office365&SharePoint-oriented conferences in Europe.
I’ve learned a lot, talked with multiple MVP’s and speakers about O365/SP issues, changes and future approaches.
I want to share my notes with you:
 
What is coming for Microsoft Productivity area (SharePoint, Office 365)
 
Microsoft Teams:
– Library UX in Microsoft Teams will have the same UX as library in SharePoint UX.
– Microsoft Teams will have new tab type: SharePoint Page 🙂
– news aggregated from SP News Pages may be fetched into channel via new connector dedicated for sp news page.
 
SharePoint:
– SharePoint will get an Image Webpart which displays image and also suggest tags based on objects recognition in image(!).
– New Modern SP News pages – aggregate news from site hubs. Allow for creating templates, targeting (via details panel that based on metadata). News can be marked as “read later” (such news will appear in dedicated panel in user profile) and also marked as official (which will increase reach to recipients). Page promotion can be also achieved via email (right from the page) or added to navigation for better visibility. If page was not a news page it can be easily converted to such. Worth to note that you can also utilize Microsoft Flow for workflows activities (accepting, reviewing, publishing, extended notification etc). In terms of future releases Microsoft is working on network/click analytics as well as automatic translations
– SharePoint pages support content targeting so people will see content more personlized
– “Share with” expirience will be constant on every device. Moreover all related policies will be better visible for sharing person.
– you can embed Microsoft Streams video as a webpart in SP page. Why to do that? Because Microsoft Streams supports searching inside video (!)
– Site Collection structure will be replaced by Site Hubs. Hub sites aggregate news/activity content + add same global navigation. Hub concept bases on site label tagging (rather than structural db-related site collections that makes maintenance not that easy) – you can easily move site from one hub to another.
 
SharePoint search:
– In new SharePoint Classic Search UX will be replaced by Modern Search. It will be also open for customization using spfx.
 
OneDrive:
– OneDrive will monitor suspicious behaviours (i.e. caused by maleware) and allows you for ease restoration of all changed files
 
Yammer is now more integrated:
– Yammer groups connected to O365 groups (had a shared calendar, SP site)
– announcements are push msgs on mobile
– well cooperate with Streams
– will be integrated with SP search (soon)
– Future: all files in yammer will be stored in SP, content sharing improvements, further development over employee engagement and social features.
 
 Dev&Tech:
– PnP is going powerful more and more. One of the best Frameworks from Microsoft (or not that Microsoft in fact ;)). Billions of usage per month. Absolutely amazing. If you do not know it that better do – immediately!!!111oneone -> https://github.com/SharePoint/PnP 

 – You probably may heard of Site Scripts: JSON files, which define an ordered list of actions to execute while creating the SharePoint site. The actions can include any combination of below:

  • Create a new list
  • Apply theme
  • Set site logo
  • Add navigation
  • Trigger Microsoft flow

Site design may contains 1 or more site scripts. However site scripts has it’s own limitations (i.e. no they are non-destructive. You can only add missing elements to the site). But where site scripts stops a pnp provisioning engine takes over!

On one of the sessions there were presented example of site provisioning via site scripts that runs azure function which apply pnp-provisioning.

 
From others topics:
– Skype for Business will be supported for on-premise solutions
– Microsoft Flow got new block that allows for calling ANY sharepoint REST endpoint…A-M-A-Z-I-N-G!
– SharePoint on-prem will have a Microsoft Flow gateway. However SharePoint Workflows will be still supported but it is recommended so that you first try to find a solution using Flow and if it is unachievable than try with SharePoint Workflows.
 
 
So to summarize it:
MS has a plan and they seems to know what they’re doing.
Paraphrasing Steve Ballmer words: Integrate, Integrate, Integrate.

XRANK in SharePoint Search REST API

I work with SharePoint Search from some time now. Since many clients need assistance on Search optimization KQL is one of my best mates. Especially XRANK is very powerful function that leverage KQL capabilities but also enlarge its complexity. Anyway I feel quite sure about what we can achieve using KQL and how. However last week a colleague of mine asked me about what is proper syntax of XRANK in REST search query…and I was like “emmm…”.

There are many not obvious questions – which characters need to be encoded? Is the syntax the same as in common KQL query?

I did quick documentation check as well as googling for an answer but there was no satisfying results at all (if there is no answer in Stack Overflow the web contains no answer).

So this post is about clarification for XRANK syntax in REST API calls.

Use Search Query Tool

The old sentence says “Do not break open doors”. That’s why I did not investigate topic by myself trying different REST queries to SP Search. Instead I used great great great tool called Search Query Tool. It really makes your work with search easier and faster. You can build any kind of KQL query in it and it will be translated to REST query because it uses it to communicate with SharePoint.

So for instance if you want to execute following KQL query

*  XRANK(cb=1) Position:Manager

Its REST equivalent will be:

<SearchEndpointURL>?querytext=’*+XRANK(cb%3d1)+Position:Manager’

As you can see syntax is the same as in common KQL query however ‘=’ character has been encoded to URI format in order to be properly understood by browser and endpoint and any spaces has been replaced by “+”.

Complex XRANK queries

Remember that in order to build you must remember about proper use of parenthesis. For instance if you want to make multiple XRANK boosts you need to arrange them in following way:

(SearchQuery XRANK(cb=1) condition1) XRANK(cb=1) condition2

In other words, if you want to add boosting for position AND for date freshness your KQL will look like below:

(* XRANK(cb=1) Position:Manager) XRANK(cb=0.5) LastModifiedTime>{Today-365}

and your REST query text will be like following:

querytext='(*+XRANK(cb%3d1)+Position:Manager)+XRANK(cb%3d0.5)+LastModifiedTime>{Today-30}’

which gives you following results:

  • results older than 30 days and for person that position does not contain “Manager” in its name will get 0 ranking points
  • results modified less than 30 days ago and for person that position does contain “Manager” in its name will get 0.5 ranking points
  • results older than 30 days and for person that position does contain “Manager” in its name will get 1 ranking points
  • results modified less than 30 days ago and for person that position does not contain “Manager” in its name will get 1.5 ranking points

 

Hope it helps you in using XRANK and KQL in REST API queries.

 

Thanks & have a great day!

Week 4/2018

Hey,

I decided to post week updates less often, but more valuable. And this week I have something really worth of noting:

 

How to execute ANY SharePoint powershell command programmatically using C#

In one of my projects my team faced following challenges:

  • How to add query rules programmatically using C#
  • How to update thesaurus programmatically using C#

I tried to find information in official documentation but it was not very helpful neither was googling.

Powershell cmdlets to c# assembly mapping

In my team we were thinking what to do in this situation and one of my colleagues came with brilliant idea – he searched for PowerShell cmdlet in file explorer with searching in files content option turned on.

Result? What he found was exactly what we were looking for.

In location “C:\Program Files\Common Files\microsoft shared\Web Server Extensions\16\CONFIG\PowerShell\Registration” there is file named OSSSearchCmdlets.xml.

What it contains is xml structure with following structure:

       <ps:Cmdlet>

            <ps:VerbName>Get-SPEnterpriseSearchCrawlContentSource</ps:VerbName>

            <ps:ClassName>Microsoft.Office.Server.Search.Cmdlet.GetSearchCrawlContentSource</ps:ClassName>

            <ps:HelpFile>Microsoft.Office.Server.Search.dll-help.xml</ps:HelpFile>

        </ps:Cmdlet>

 

My eyes see this just as below:

       <PowershellToAssembllyMapping>

            <PowerShellCmdName>What-I-Have</PowerShellCmdName>

            <C#NameAndLocation>What-I-Am-Looking-For</C#NameAndLocation>

            <Whatever>Whatever.xml</Whatever>

        </PowershellToAssembllyMapping>

Maps for Search, WSS and many more

OSSSearchCmdlets.xml file contains ps cmdlets to .NET assemblies mapping only for SharePoint Search.

But in the same location there is also another file called WSSCmdlet.xml that contains all kind of cmdlets mapping like

  • Enable-SPFeature
  • New-SPContentDatabase
  • Get-SPFarm
  • Etc.

Shortly everything that you can do with SharePoint Application using PowerShell.

 

If you just want to quickly check what those files contains I’ve uploaded them to my github. I put there also more files like for Reporting Services, Workflows etc. You can check it here.

Have you found useful this tip? Maybe you know alternative way? Share it in comments!

Thanks & Have a great day! 🙂

 

Week 1/2018

Hey there!

Welcome in the first week of 2018. End of 2017 was quite busy but not only for me – I guess all IT world was focused on closing projects or budgets (polish companies close budgets on end of calendar year). In other words there is not much to update except maybe one thing:

  • SharePoint Online – personalized search from SharePoint home in Office 365. It includes multiple results (like sites, people, files) based on your activity and frequency.

That’s why I try not to focus only on MS updates but also on interesting articles from MS-IT world. Like below:

Script Wars: The Farce Awakens (part I)  – both amusing and informative posts about how to write powershell properly. Directly from MS PFE who is “strong in the ways of The Farce”. 

Microsoft is now like never before

Today won’t be technically. Today will be about something that has been following me from a long time. Something that is a result of many years strategy and 27caused that Microsoft is now like never before. 

Genesis: The Story 

Few weeks before now I had a chat with a colleague of mine. In his company he has O365 tenant with all of its sugar: Word, Excel, Project Online, SharePoint Online etc. However for team chat/messaging his company use Slack. When I asked “Why?” he answered: “we’ve tried using Skype for Business but it’s unusable. It’s absolutely counter-intuitive and its conference quality (especially audio) leaves a lot to be desired. And I must agree. But then I asked him:

Continue reading “Microsoft is now like never before”

How to map user profile to ECT field

Last week I encountered a problem related to External Content Type (ECT). I had a SQL table that contains article information: title, content and author. I wanted to search in that table using SharePoint 2016 search (on-prem). In order to do that I’ve created an External Content Type with above data, create content source and crawl it. Then I’ve mapped all crawled props to managed props in search. I was able to see articles data from SQL in my search results. 

Perfect? Not really…

Continue reading “How to map user profile to ECT field”

How I speed up loading my SharePoint Online site component 6x – part 2

Last week I wrote a post about how I fix CSOM code in order to accelerate whole query execution. Final result was not that bad though still not good enough:

  • 0.8s for fetching ~500 subsites
  • 6.5s for fetching ~900 subsites recursively for whole subsites hierarchy

My aim is to fetch whole subsites hierarchy within time that is reasonable to wait (1-2s total).

In this post I show you how to achieve it – we can fetch whole subsites hierarchy in less than 2s!

Continue reading “How I speed up loading my SharePoint Online site component 6x – part 2”

How I speed up loading my SharePoint Online site component 6x – part 1

Intranet home page should contains all information that are needed in daily manner. In fact many companies use home page as a traffic node where everybody comes just to find a navigation link pointing to another part of intranet. In my current company, Findwise, we do that too. However one of our components that allows us to quickly navigate through intranet sites gets slower and slower year by year. Currently it’s loading time is almost 10 seconds! I decided to fix it or even rebuild it if needed. Especially that few weeks ago on ShareCon 365 conference I talked about SharePoint Framework in Search Driven Architecture where I described the customer case, PGNIG Termika, who saved about 600k PLN (~$165.000) per year thanks to their information accessibility improvements (information time access dropped from 5-10 minutes to 1-2 seconds). 

In this post I wanted to show you what was the problem, how I fixed it and how my fix cuts the component loading time 6 times!

Continue reading “How I speed up loading my SharePoint Online site component 6x – part 1”