Thursday, November 10, 2016

Two SharePoint Online search nuggets from Ignite

Ignite is long over, but there were two very useful nuggets in the session BRK2045 – Explore new personalized, intelligence powered search experiences in SharePoint, Delve and O365.

Disclaimer: We don’t know the exact timeline for these features, but they are on the roadmap.

Image result for nugget

  • Content enrichment web service will work for hybrid crawls – This allows you to keep any existing investment in CEWS to work if you switch to indexing content into the SPO index instead of your on-premises index (slide 25)
  • Custom synonyms feature in SPO admin UI – Perhaps a bit cryptic, but this means we will get a thesaurus in SPO search. Huge! (slide 26)

You can find the presentation and video of the session at the Microsoft Tech Community site.

Don’t be afraid of spaces in your query templates


I was talking to Andrew Clark and he was pretty frustrated after debugging a search issue. Turned out the query template was written like this:


Notice the lack of a space between {searchTerms} and path. So when adding query variables, throw in some spaces and you can cut a lot of frustration when debugging. If not the the last query term will have path appended to it as part of the term like: foopath: instead of foo path: 

The right syntax is:

{searchTerms} path:

Thursday, November 3, 2016

Whac-an-MVP - creating a PowerApp Game

PowerApps shows a lot of potential to enable power users to create line of business application for their organizations and teams. It’s cross platform, and I see a lot of good mobile use cases for form entry in the field, where data is then sent back to a central repository. The integration with Flow makes it quite powerful in terms of achieving business processes as well. I’ve dabbled a bit with iAuditor before, and I think PowerApps could solve many of the same cases.

Learning PowerApps


When teaching myself new technology I either need a concrete business case or something fun as the basis. Some people got a taste of that at Ignite ;-)

For PowerApps I started out with a proof-of-concept data entry app for a customer, but I cannot disclose details of it yet. In general it shows product information and allows you to visually configure product options and then send an order to a back-end system. In this instance a SharePoint list, but it could very well be some other ERP system.

Wednesday, November 2, 2016

Creating a resize animation in PowerApps

PowerApps made general availability November 1st 2016, and provides a great way for line of business specialists to create no-code applications to solve business challenges they see in their department or team. Once you tapped into data sources and created your logic, you might want to spruce up the application with some animations to make it look a little bit slicker. And that’s the basis of this post.

Read more about PowerApps at

I’ve recently been developing a couple of PowerApps, and in one of them I wanted to resize an image in a fluid manner before displaying an entry form. There are no built-in transition effects on objects, but by using the timer control you can actually achieve quite a lot.

Your other option is to create the animation somewhere else as either a movie file or gif animation, but where’s the fun in that.

Add an image control and timer control

Image controls can show images from either embedded resources, or from a web address. I’ll go with the latter. Add an image control to your screen and set the Image property to some URL.


Resize the image to the start position and add a timer control to the screen and set the Duration property of the control to 2 seconds (2000 milliseconds).

As I want the image to be half the original size, I’m using this formula:

768 - ((384*(Timer1.Value/Timer1.Duration)))

768 is the full height, and 384 is the half of that, so I replace 768 with the formula above, which will over the span of the timer reduce the height of the image down to 384.


Start a preview of the screen, click the timer control and watch the animation unfold.


You can of course hide the timer and start that by some other action, but it shows the concept and should get you started. If you want a slower or faster animation, just change the timer duration.

Tuesday, September 20, 2016

PowerShell script to upload user profile images to Office 365

There are numerous posts out there about how to do this, but thought I’d share my small script which includes the option to have images > 10kb. The script assumes you have a folder with with images on the notation <username>.jpg. It will loop over all images and use the Set-UserPhoto commandlet to upload the image.

The first time you run the script it prompts you for the password for the account you are using and stores it as a secure string in a file to be used on sub-sequent runs or on a schedule. The script will also move images one folder up after processing.

$adminUser = ""
$localFolderPath = "d:\images\upload" 
$passwordFile = "$PSScriptRoot\userphoto-password.txt"

    read-host -prompt "Type the password for $adminUser to be used (will be saved encrypted)" -assecurestring | convertfrom-securestring | out-file $passwordFile

$password = cat $passwordFile | convertto-securestring
$MSOLCred = new-object -typename System.Management.Automation.PSCredential `
         -argumentlist $adminUser, $password

$ExOLSession = New-PSSession -Credential $MSOLCred -authentication Basic -Configurationname Microsoft.Exchange -ConnectionURI -allowredirection

#load Exchange Online Management cmdlets
Import-PSSession $ExOLSession -AllowClobber

$files = ([System.IO.DirectoryInfo] (Get-Item $localFolderPath)).GetFiles() |  ForEach-Object {
    if(([IO.Path]::GetExtension($_.FullName)) -eq ".jpg") {    
        $username = [IO.Path]::GetFileNameWithoutExtension($_.FullName);    
        $userPhoto = ([Byte[]] $(Get-Content -Path $_.FullName -Encoding Byte -ReadCount 0))
        Set-UserPhoto -Identity $username -PictureData $userPhoto -Confirm:$False
        #move files one folder up after processing
        $destinationFolder = Split-Path -Parent $_.Directory.FullName
        move-item $_.FullName $destinationFolder
#unload session
Remove-PSSession $ExOLSession

Thursday, September 15, 2016

SharePoint Online Search Toolbox

Bilde av app
Finally! It’s taken me a while to get this app ready as I’ve developed it in spare evening hours here and there. But it’s out, and I hope it fills a need.

SharePoint Online Search Toolbox by Puzzlepart
Get the app!

Creating search based solutions and troubleshooting search in SharePoint Online takes time. Time and money more wisely spent on the actual solutions themselves. Over time I’ve discovered two major gaps when we moved from on-premises to online: Being able to run full crawl when we change the search schema and being able to investigate and look at the crawl log.

'SharePoint Online does not allow the same control as SharePoint 2013/2016, but there are ways. Previously I’ve created PowerShell scripts to trigger re-indexing of content and user profiles, and you can actually via e-Discovery get access to the SharePoint Online crawl log, but this also expose all your content – something you might not want to give out to anyone.

Hence, I started developing SharePoint Online Search Toolbox. The application gives you a UI to view the crawl log, much like you can on-premises, and it also allows you to trigger re-indexing of user profiles or content tenant wide. The app is distributed on subscription, per tenant but if you’re like me and my colleagues at Puzzlepart, you should quickly save this when a search issue arise.

If people value the application, and have suggestions for features, they might just be added :)

And.. if you’re a Puzzlepart Assist 365 customer, we’ll throw the app in for free!

App image

Friday, September 9, 2016

Why you should use tools like SPCAF when developing for the SharePoint framework

Just want to say that I’m not affiliated with Rencore in any way, and I write this review on my own merit – not being asked or forced to do so :-)

Being an Office Server and Services MVP I know most of the guys at Rencore, and have for a long time. As I’ve been part of the SharePoint Framework preview program at Microsoft, the guys at Rencore asked me if I wanted to test out a beta version of SPCAF for the SharePoint Framework. As I’ve just completed a SPFx web part for an Ignite showcase I figured I’d give it a shot.

I first had some issues with the SPCAF license they gave me, but that got fixed fairly quick. These guys know how to provide stellar support for sure.

So what happened when I ran gulp spcaf in my project?


4 critical errors, 6 errors and 1 warning

The critical ones were related to custom web part properties which I had forgotten to add to the web part manifest, and one which was in the manifest, but I wasn’t using. The warning was due to I had specified both to use a font based icon and an image based icon for the web part – left overs from testing (and a bug filed). All easily fixed as it pointed me to the file needed fixing.

The 6 errors were related to dependencies for Office UI Fabric components I had forgot to list in the external list. I did have the main component listed which was done automatically when I added the package, but the specific components I had not thought about (Button, List, Spinner etc). I knew the file for this was config.json in the config folder, but would be nice if the report stated so as well. Rencore, you fix? :-)

So, all in all.. config errors, none real critical, but nice to have fixed for sure. And I’ll definitely continue to use SPCAF for future SPFx projects. It takes over where the linting of TypeScript ends. I give it two thumbs up!

Thursday, September 8, 2016

Office 365 Groups , Delve Analytics and Search–I’ll be speaking at Microsoft Ignite 2016


A couple of more weeks now and Ignite kicks off! I had a blast last year and I’m looking forward to see how this years event turns out as well as looking forward to hang out with new and old friends in the SharePoint community.

Here’s the breakdown of the three sessions I will be delivering – and if you’re going maybe I’m covering a topic you’re interested in.

Be more effective with Delve and Office Graph Analytics

THR2191 – 20 minutes - Wednesday, September 28, 2016 5:05 PM - 5:25 PM – Expo Theatre 3

Are you curious about how Delve Analytics and the information in the Microsoft Office Graph can make you more effective? Get a quick demo of the insights available out of the box in the different Office 365 plans and you might just end up more self conscious about how and who you work with.

Move search from on-premises SharePoint to the cloud: tips and tricks

THR3055 – 20 minutes - Thursday, September 29, 2016 1:35 PM - 1:55 PM – Expo Theatre 4

Going cloud means you have to analyze your on-premises setup and see what works in the cloud. This session covers some of the bumps you might encounter and show possible alternative roads to make sure the journey is successful. We touch on both moving content and search to the cloud, and the new Cloud Search Service Application for hybrid scenarios.

Learn about Office 365 Groups and how to use them

BRK2277 – 45 minutes - Friday, September 30, 2016 9:15 AM - 10:00 AM – C114
(Originally labeled as a panel discussion – but it will be a demo session)

Microsoft Office 365 Groups uses the best of breed functionality of many Office 365 services like e-mail and calendars from Outlook, files and OneNote from SharePoint and tasks from Planner. You can also create pages and lists with the recently announced team site attached to the group.

With all this functionality, where should you start and how can Office 365 Groups help your business?

The session gives an overview of what Office 365 Groups are, and will cover use cases like event handling, marketing planning, educational use as well as social media handling, where Office 365 Groups can be a good fit for your organization.

Tuesday, August 30, 2016

Why you should use Azure AD id’s and not e-mail addresses or UPN when bulk importing user profile properties to SharePoint Online


Back in April Microsoft released details of a new API do do bulk import of user profile properties in SharePoint Online. Say you have a field with an employee id, and you want to set this for all users in your organization. As Azure AD does not allow you to map custom fields into the user profiles automatically you have to set the data your self. Previously you could use the user profile API as an admin to do this, but it was not possible if you were for example using an automated app with app tokens, and you also had to loop over all profiles, updating one at a time.

You can read more about the API and see a full code sample at

Tuesday, August 23, 2016

Custom hyperlink icon column using Flow

Laura Rogers (@wonderlaura) writes awesome end-user SharePoint posts, and recently wrote one which caught my eye – “Custom hyperlink icon column”. The write-up explains how you can add a custom column to a SharePoint list which shows an icon with the use of SharePoint workflows. This got me thinking if this is doable using Flow instead…. and it is :)

I suggest you read Laura’s post first, then go ahead with this one.


Note: This only works for SharePoint lists at the moment using Flow, not document libraries

For my scenario I will cover how to add a custom edit icon to a list – which in a modern list view takes you to edit mode in one click instead of two. Wooo!