Thursday, April 28, 2016

Search your internet site via Bing in SharePoint

I’ll credit this post to Dean Gross who did the legwork, and builds on my previous post about showing external RSS feeds in SharePoint via Search. If you want proper rendering of the results make sure to visit the post.

You might want to list some internet results on your SharePoint pages, and you can do this creating a new OpenSearch result source targeting Bing which supports RSS as a return format of results.

Create a new Result Source at the level of your choosing, set it to use OpenSearch 1.0/1.1 as the protocol and paste this URL in the Source Url field: {searchTerms}&count={itemsPerPage}&first={startItem}&mkt={language}&format=rss

The above URL will lists items from this blog.


Drop a content search web part on your page using this result source and you are good to go!

If you’re not passing in a search term yourself, remove {searchTerms} from the URL.

Setting up Azure Business to Business (B2B) access for use with SharePoint Online

SharePoint Online’s support for sharing sites and documents with external users has been there a while now, but sharing with each individual users is quite cumbersome if you have to share with a volume of users. This is where Azure B2B comes into play, and the Azure team has good information on this over at Github.
Steps covered in this post:
  • Create AAD security group
  • Enable external sharing in a site collection
  • Add AAD security group in the site’s Members group
  • Create and upload CSV file with all external users to AAD
  • Accept invitation and have bliss!

Search behavior of automatically created managed properties

When you create site columns in SharePoint they will have automatically created crawled and managed properties created for them. The naming convention for the properties is explained in detail at TechNet, but it doesn’t mention what properties are set for the associated managed properties.

As far as I know this is the behavior:

  • All managed properties are set to retrievable
  • All managed properties are set to queryable
    • except multi-line and pub image/html/link fields
  • Taxonomy fields are also set to searchable (which makes no sense what so ever to me)

Thanks to Graham Sheeley for the idea for this post :)

An approach to cleaning up search schema changes in a site collection

Graham Sheeley posted a question in the Search Explained Yammer network about how to undo search schema changes at the site collection for SharePoint Online (which also applies to on-premises).

The difficult part here is to know what changes have actually been done to the schema so you can undo them. There is no magic undo button, but here’s a working procedure to remove any unwanted changes.
  1. Go to site settings for your site collection
  2. Click Search Configuration Export below Site Collection Administration
  3. Open the exported xml file in your favorite text editor, as this file will contain only the changes made at the site collection level
  4. Look for the SearchSchemaConfigurationSettings node
  5. In the ManagedProperties nodes you will find new managed properties which have been created, in the image below a new one named MikaelKnowsHisStuff
  6. Re-crawl content to weed out values from the index
If you have made mappings to existing managed properties you will see these listed in the Mappings node and have to examine and possible compare with a blank site to see which have been added or removed.

Unfortunately it’s not a simple undo operation, but at least possible. This is also why I strongly advocate to re-use the reusable managed properties for your custom use, as it’s quite easy to see any mappings done in the UI, as long as you know which ones might be globally mapped.


Wednesday, April 27, 2016

Gotcha when administrating multiple MMS’ in SharePoint


If you create more than one managed metadata service in SharePoint and want to enter one of them via Central Admin, make sure BOTH are checked off as available services for the Central Admin web application. If only one is selected, then clicking either MMS will take you to the one assigned to the web application.

Thursday, April 21, 2016

Why the community is awesome!

I’m building out a custom form for a customer using AngularJS and Office UI Fabric. And I’m using the ng-officeuifabric directives to do so.

In my case I needed a multi-line text field. When I started out my project multi-line had not yet been implemented in the <uif-textfield> directive so I went with the markup directly from Office UI Fabric instead. Along the way multi-line support got added, but there was an issue that if you clicked within the textbox on the label, the control did not activate – you had to click beside the text in order for the textbox to get focus.

I headed over to the github site for ng-officeuifabric and logged an issue on it. Soon after Andi Krüger picked it up, created a branch with a fix and I got an e-mail alert to take a look. I pulled down the branch, built-it, found and fixed a bug where it didn’t check for single line or multi-line, which I notified Andi of on the projects Slack channel. Boom, issue resolved in less than 24h.

Came back from lunch and Andrew Connell has merged Andi's PR on the matter and a new npm package was readily available. Ran "npm -update" and I was good to go with the latest release.

That's how AWESOME the community is!

Thursday, April 7, 2016

Considerations when upgrading WSP’s from one SharePoint version to another

I’m currently helping a government client move a SharePoint 2010 farm over to SharePoint 2013, but this post is just as valid if you move solutions over from 2013 to 2016.

The backdrop for the migration is that they have numerous WSP’s with server side code, and when migrating to SharePoint 2013 they decided to keep the server side code instead of moving over to a client side model. A decision made before I was involved, but it’s a valid one for many scenarios.
Before delving into some upgrade paths you can take and the one chosen, let’s sum it up!

Lesson learned

Be smart, plan ahead and think well before you involve your favorite consultant on the migration path – it might be one of the last tasks he or she will help out with, regardless how nice and forthcoming they are.

When migrating from one SharePoint version to another keeping server side code, do the simplest thing possible with the least amount of moving parts. Do not mix in code refactoring's and changes as part of the process. If you do feel the urge to do so, then create new solutions which can co-exist side by side with the 2010 packages, and save yourself a lot of grief and swear words if you’re inclined to those.

Planning a SharePoint upgrade and want help? Feel free to contact me or Puzzlepart and we’ll be happy to forward you to someone who likes these kinds of tasks. If you however want to move from WSP’s to a client side model as part of the migration we’d be happy to assist :)