Friday, January 6, 2017

Retrieving search results from private Groups in Office 365 via REST

By default when you run a search REST query against SharePoint Online results from private Office 365 Groups are not included.

By adding &Properties=’EnableDynamicGroups:true’ to the URL, you will also get results from private groups.

If you are running REST POST requests, add the following to your JSON payload (odata=verbose):

'Properties':{  
         'results':[  
            {  
               'Name':'EnableDynamicGroups',
               'Value':{  
                  'BoolVal':true,
                  'QueryPropertyValueTypeIndex':3
               }
            }
         ]
      }

When using CSOM, it seems dynamic groups are included by default.

Sunday, December 25, 2016

Communication & Marketing with Planner - Office 365 Groups Scenarios (2/4)

image

Ever since Office 365 Groups was released in preview the discussion “when to use what” has been going on between Office 365 Groups and Team Sites. I’ve been opinionated in the debate myself, but instead of listing pro’s and con’s I presented four scenarios at Ignite in Atlanta where Office 365 Groups shows great promise of solving work related problems.

You can get the slides and watch the recording of my session BRK2277 - Learn about Office 365 Groups and how to use them, at the Microsoft Tech Community site. The video is also featured on Microsoft’s support article: Learn about Office 365 groups.

Communication & Marketing

image

This scenario is about marketing activities and is highly driven my tasks in Planner. Different tasks related to for example news articles, recruiting campaigns, and updating the public web sites are all added to Planner as a place to know what’s in the pipe. Events related to marketing efforts and various important deadlines are added to the Groups calendar. Files related to marketing collateral are stored in SharePoint, and notes on vendors and venues are stored in OneNote. We also receive Puzzlepart relevant tweets and news into the Groups mailbox using the Groups connectors.

Previously we had tasks in Jira, files in Dropbox, and no shared view of monitored news. Moving this to an Office 365 Groups has made a lot of sense in order to get a unified view of marketing and communications efforts.

Other planner based scenarios following the same lifecycle:

  • Development tasks in a kanban style manner
  • Todo lists for a larger group of people

Thursday, December 15, 2016

The Calendar - Office 365 Groups Scenarios (1/4)

image

Ever since Office 365 Groups was released in preview the discussion “when to use what” has been going on between Office 365 Groups and Team Sites. I’ve been opinionated in the debate myself, but instead of listing pro’s and con’s I presented four scenarios at Ignite in Atlanta where Office 365 Groups shows great promise of solving work related problems.

You can get the slides and watch the recording of my session BRK2277 - Learn about Office 365 Groups and how to use them, at the Microsoft Tech Community site. The video is also featured on Microsoft’s support article: Learn about Office 365 groups.

The Calendar

image

This scenario is focused around events in time, typically recurring events. The event at a point in time is in focus, and you use Office 365 Groups to support the event. The Group Calendar handles the scheduling of the event, conversations before and after the event can take place using the Group mailbox, and notes during the event are stored in the Groups OneNote. If you want to chat during the event, you could opt-in to use Microsoft Teams.

In my Ignite demo I showed Puzzlepart’s internal recurring event Puzzle Friday, where we every other month go over financial status, give an overview of customer cases, have topic discussions and I present “The Svenson Files”, an aggregate of what has happened in the Office 365 space since last meeting.

image

As you can see, we use OneNote both for the agenda and all notes taken during the event. We also add follow-up tasks in the OneNote itself. Supporting presentations are stored in the Groups document library, one folder per event occurrence. Then linked into the OneNote. The beauty of this is that we can have one pc hooked up to the projector, which always have all content needed easily available. No switching to my pc for some presentation – it’s all available :) For live demo’s we often create web casts up front, stored in Office Video.
Other calendar scenarios following the same lifecycle:
  • Board meetings
  • Any department/division regular meeting
  • Sprint planning / reviews
If you wanted to improve on the scenario you could build OneNote templates to cover all pages needed per event occurrence.

Wednesday, December 7, 2016

Tip for writing multiple XRANK’s or nested XRANK’s

image

My colleague Tarjei had a requirement to list items in a particular order on a page. The items were tagged with different phases and he wanted items to be listed in this order:

  • Concept
  • Planning
  • Doing
  • Finishing
  • Realization
  • No phase

The easiest approach I have found doing these types of custom ordering is using XRANK with bulk interval boosts to ensure the order. Pick an interval which suits you. If you need multiple levels of sorting add secondary sorts with intervals less than the major range.

One level sorting:

  • Concept cb=100
  • Planning cb=90
  • Doing cb=80
  • Finishing cb=70
  • Realization cb=60
  • No phase cb=50

Two level sorting:

  • Concept cb=1000
  • Planning cb=900
  • Doing cb=800
  • Finishing cb=700
  • Realization cb=600
  • No phase cb=500
  • Word cb=50
  • Excel cb=40
  • PDF cb=30

Once you have the logic in place you need to write a nested XRANK statement. This often gets confusing with getting parenthesis correct. A Pro tip is to use Freshness Boost Generator in the SharePoint Search Query Tool as a starting point, and then replace your matching and boost expressions as needed. Say you need 6 sorting intervals. Set the constant and max boost values to 0, and add 6 day intervals as seen in the image below. Copy the resulting expression and change the write>{} parts and XRANK(cb=) parts as needed – with all parenthesis intact at the right places.

image

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

image

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:

{searchTerms}path:http://intranet.contoso.com/sales

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:http://intranet.contoso.com/sales instead of foo path:http://intranet.contoso.com/sales 

The right syntax is:

{searchTerms} path:http://intranet.contoso.com/sales

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

image

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 https://powerapps.microsoft.com

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.

image

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.

image

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

resize-anim

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 = "foo@contoso.onmicrosoft.com"
$localFolderPath = "d:\images\upload" 
$passwordFile = "$PSScriptRoot\userphoto-password.txt"

if(![System.IO.File]::Exists($passwordFile)){
    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 https://outlook.office365.com/powershell-liveid/?proxyMethod=RPS -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