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 https://dev.office.com/blogs/introducing-bulk-upa-custom-profile-properties-update-api.

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!

Friday, August 19, 2016

Overriding default styles in a SharePoint Framework project


I’m building something using the pre-release of SPFx and by default when you start a project you have a SASS scss file for styles named something like MyPart.module.scss. This is all fine. Say you create a class:.myClass {}

This will be bundled and prefixed for you to be unique when you run the web part, like this: .myClass_e90cb14c

But what if you don’t want class names to be prefixed? In my case I needed to overload some styles coming from a component I’m not controlling. It’s actually very very very easy. I added a normal .css file to my project and at the top of the .cscc file I added the good ‘ol import statement like this:

@import url('MyPart.override.css');

The imported file will be included just fine, just not prefixed like the ones in the scss file.

(Thanks to the Kimzter for hinting I should try this)