Walkthrough: Migration Manager

In this post we will take a detailed look at the Migration Manager, it’s capabilities, limitations and how to create pre-scan and migration tasks for the first time.

Contents

Overview

So the good news is, if you have a Microsoft 365 subscription then you also have the Migration Manager too! The Migration Manager went into general availability in June 2020 for all customers as part of the SharePoint Online offering.

The Migration Manager is a part of the SharePoint admin center and is really simple and easy to get set up and begin using. Microsoft have this handy image to demonstrate how easy the process is:

Set up migration agents
Credit: https://docs.microsoft.com/en-gb/sharepointmigration/mm-get-started

Current limitations

Currently, the Migration Manager only supports file share migrations, this means that if you are planning to migrate any other content you hold, for example: on-premise SharePoint content or cloud based content you would need to use a separate tool.

Microsoft also offer several other tools that can facilitate the migration of that content too. Microsoft provide a table which recommends which tool to use here, but I’ve whittled them down to the main options below:

  • Migration Manager: used for network and local file share migrations, easy to set up via the SharePoint admin center
  • SharePoint Migration Tool: used for SharePoint Server 2010, 2013 & 2016 (Public Preview), network & local file shares, requires some prerequisites configuring before installation
  • Mover: Service for cloud to cloud migration (Dropbox, Google Drive etc.), easy to set up via web platform

Another limitation of the Migration Manager is that it currently does not support third party multi-factor authentication.

Setup considerations

So as the above breakdown of each Microsoft migration tool suggests, the Migration Manager is easy to get going. The key consideration when using this tool to migrate file share content is around the volume of data you are migrating.

If you are using the Microsoft FastTrack service, they will recommend that you set up a number of migration machines relative to the total number of files you are migrating.

The recommendation they offer for scoping this is below:

Total file countMigration machines required
Less than 200,0002
Between 200,000 and 500,0003
Between 500,000 and 1,000,0006
More than 1,000,000To be discussed with FastTrack

Once you decide how many migration machines will be required, you will then need to setup the migration agents on each machine, check the prerequisites and required endpoints have been reviewed and met, and also have the relevant accounts being used as part of the migration process given access to the file share content and SharePoint admin roles.

File and folder permissions

When prepping for your file share migration, another consideration will be the permissions of a file once it is migrated. For most organisations it comes down to the following scenarios:

1. We want all file/ folder permissions preserved when they migrate to SharePoint Online

2. We only want specific file/ folder permissions mapped into SharePoint Online

3. We don’t want any of the permissions migrating, we want to start again!

Yes, I know the third option is highly unlikely, but I’ll include it anyway. When using the Migration Manager, the syncronization between your Active Directory on-premise and Azure Active Directory is key to how permissions migrate across.

It is important to note that if your organisation uses security groups in Active Directory to manage permissions for their file shares, they must be syncronized with Azure Active Directory in order for the user permissions to map across like-for-like.

If not, then you will be required to create a user mapping file to map user permissions for the relevant files or folders.

The Migration Manager also takes into account the same permissions conditions and results as the SharePoint Migration Tool. This table lists all the conditions and the corresponding results.

Demo: create a scan only task

Before you run any sort of migration task you will first want to get a handle on the current situation of your file share content, what areas will migrate easily and which will require remediation.

Both the scan and migration actions sit within Tasks in the Migration Manager and the initial setup for both actions is the same:

  • Press add task > under Method select the default single source and destination (unless you wish to scan multiple sources)
  • Under Source, enter the file share path that you wish to scan using the correct format
  • Under Destination, leave the SharePoint site URL and location as the default as we are only performing a scan
  • Under Settings, give your task a name > under common settings ensure perform scan only is checked
  • Press Run Now

Demo: create a migration task

So once you have ran a pre-scan of your file share source and you are happy with the results, it is now time to create a migration task! This again is very similar to how we approached creating the pre-scan task but here are the steps:

  • Press add task > under Method select the default single source and destination (unless you wish to scan multiple sources)
    • If you wish to do a bulk upload, you will need to provide a CSV or JSON file which is well documented here
  • Under Source > enter the file share path that you wish to migrate using the correct format
  • Under Destination > select the application where you are migrating the data to. Press next
  • Enter the URL of the location, then select the library or channel you wish to migrate to
  • Under Settings > enter a name for you task and configure your migration task based on the following check boxes:
    • Preserve file share permissions
    • Migrate hidden files
    • Migrate files created/modified after specified date
    • Do not migrate files with specific extensions
    • Migrate files and folders with invalid characters
    • Migrate OneNote folder as OneNote notebook
    • Azure Active Directory lookup
    • User mapping file
    • Automatically rerun failed tasks up to 4 times
  • Press Run Now

Reports analysis

Whether you have performed a pre-scan or migration in Migration Manager, each task once complete will provide a “task report” zip folder that is available to download. Microsoft break the reports down into Summary, Task level and Performance reports, but in fact all reports are included as part of the task report download.

The Microsoft breakdown of each report is very thorough, so I won’t bother adding any more detail, however I will highlight the reports that I found useful when using the Migration Manager:

  • Summary Report: contains a single row of data that gives the total picture; including total size, number of files migrated, duration
  • Item Failure Report: contains any errors found resulting in a file being unable or failing to migrate
  • Item Report R1: detailed report with data on each file within a task. If large number of files migrated, split into separate, sequential reports (R1, R2, R3 etc.)

An interesting aside I did notice was on the task details pane for a pre-scan I ran it showed under files scanned with issues as 0, but within the task report ZIP there was, in fact several files and folders listed as having failed due to a variety of reasons. So I’m not really sure how accurate the files scanned with issues is, or what it actually defines as issues.

Troubleshooting

Microsoft documentation includes a page on troubleshooting Migration Manager issues and errors here, but typically during a recent migration I experiencing issues that weren’t including in the above.


Error: the source file share does not exist (but it does)

This error I received recently during a home drive – OneDrive migration I was conducting. I was using windows virtual machines with the migration agents installed previously and had logged into the machine and SharePoint admin center as accounts with the relevant permissions and roles as described here by Microsoft.

When I set up my migration tasks as demo’ed above they were instantly failing. The only errors I would receive were these:

Microsoft have this listed as an agent error message – which was the clue, but their action was to:

Make sure the source file share is an existing network file share. Confirm that the Windows account associated with the agent has read permissions to the file share you want to migrate.

Troubleshoot Migration Manager issues and errors

What I found was in my case, even if the migration agents were showing as enabled, because I had originally installed and configured the agents some time ago (1-2 months prior), they need to be repaired and re-authenticated:

  • Download the migration agent setup file
    • Microsoft documentation hasn’t yet been updated, but to get to the agent download you need to open Migration Manager > Press Agents > + Add
  • Run the agent setup file
  • Press continue to reinstall the agent
  • The installer will then begin the installation prerequisites
  • Enter account credentials for the SharePoint Admin, then Windows account
  • The installer will authenticate, then prompt you to test permissions with a file share, press OK to close

Now, when I re-ran my migration task with my agents repaired and re-authenticated, the tasks completed successfully.


Error: failed to duplicate token file due to error ‘There is not enough space on the disk’

This error occurred for me during a pre-scan of file servers locations. After kicking the scans off, I returned to find many of them failed. When looking at the task error details from the logs I found the following:

Error, Failed to duplicate token file due to error ‘There is not enough space on the disk.

This error was pretty much what it says on the tin, the VM had ran out of disk space. As referenced before, looking through Microsoft’s issues and errors post didn’t prove helpful as the error above is not listed.

So, through investigation of my own I found the following:

  • There are a bunch of MTHost text files that appear to be log files of actions completed when tasks are ran within the Migration Manager.
  • There is a Migration folder, within a subsequent MigrationTool folder, another folder with your tenant name will be found. In here will be folders with names beginning “WF_” which represents each task created within the Migration Manager.
  • Each “WF_” folder contains a Log and Report folder, with the report folder containing all the migration reports we detailed earlier in this post.
  • There is also a MigrationToolStorage folder which also contains a mirrored “WF_” series of folders related to tasks created within Migration Manager.

What’s crucial to understand here is you are able to delete the “WF_” folders from these locations, without it affecting the tasks in Migration Manager, or the ability to download the corresponding task reports.

I’ve tested deleted all the “WF_” folders from both the above folders and then refreshing and trying to download task reports for the tasks in the Migration Manager – and they download perfectly!

What I would question is what is the point of these “WF_” files downloading locally in the first place if they are also stored somewhere in the M365 cloud as well!


You cannot migrate to a deeper destination than first sub-folder

When migrating files from source to destination, in some cases you may want to migrate specific data that sits within a larger, nested folder structure. For example, lets say you have a folder that sits in a file share like this:

\\contoso\fileshare\foldera\folderb

You only want to migrate folder b and nothing else except its associated folder structure. In Migration Manager, you are only able to select the first, top-level folder from a library. This applies to OneDrive, SharePoint or Teams and doesn’t offer any other sub-folders to be selected via the tool itself.

In Migration Manager you are only able to select the first. top-level folder from a library in OneDrive, SharePoint or Teams.

If you try to create migration tasks via CSV and include the sub-folders as additional columns in the spreadsheet, the Migration Manager ignores them and just migrates whatever is in the destination to the source library.

I would say generally this isn’t an issue as you can either skip the files you do not want to re-migrate and just set the source/ destination to be at the top-levels. This specific scenario came about because I was trying to remediate some files and folders that failed a prior migration, and once remediated migrate those folders only via Migration Manager into the corresponding folder structure in SharePoint. I would say this is an issue if you are doing what I described and don’t want to have to run another large migration task, even if it is skipping most of the files as the task will still take a while to complete.


Provisioning the M365 learning pathways solution

This post details my experience of trying to provision the 365 learning pathways solution from the SharePoint look book and what I found that differs from the documentation.

Contents

Overview

The first thing to say about this is it’s quite literally a click of a button to actually provision the M365 learning pathways solution from the SharePoint look book, but please make sure you do read the prerequisites as that may well catch you out.

My one big takeaway from writing this post is that the initializing of the CustomConfig list is a crucial step.

Official Microsoft resources

Tenant admin or global admin?

The prereq’s makes mention of being a tenant administrator, the account I used was an O365 global administrator. A quick google search here shows that a tenant administrator is now the global admin role.

Google search of an O365 tenant administrator.

You can also use these steps in the troubleshooting guide to check if you have the relevant permissions.

Create an app catalog site

The solution requires an app catalog site to be created in order to work, to do this you’ll need to navigate back to the old SharePoint admin center, or the classic site collection page to be more in-line with the official verbiage!

To get there, press More features > under Apps, Open.

How to access the classic site collection pages from the modern SharePoint admin center.

From here it’s easy to create a new app catalog site, I’ve documented this before as part of the SharePoint start kit deployment, but to summarize:

  • Select app catalog
  • Press OK to create a new app catalog site
Select app catalog from the apps menu option
  • Enter the following details
    • Title: app catalog
    • Web Site Address suffix: enter your preferred suffix for the app catalog; for example: apps
    • Administrator: enter your username, and then select the resolve button to resolve the username
  • Press OK

Check global admin is app catalog site collection admin

You also need to make sure the provisioning account is also a site collection administrator for the app catalog site. To do this just select your app catalog site, press Owners > Manage Administrators and make sure its the either listed in the primary or one of the other site collection administrators.

Manage the administrators of the app catalog site in classic SharePoint admin.

Initialize the CustomConfig List & assign owners

Once the learning pathways site has been provisioned, the account used will receive an email to confirm. In the email there will be a link to the custom config list that needs to be run to set up the site for first use.

Once you load the CustomLearningAdmin.aspx page this page will be displayed.

If you don’t receive an email from the PnP provisioning service, then just navigate to your learning pathways site, then just add /SitePages/CustomLearningAdmin.aspx to the end of the url:

<YOUR-SITE-COLLECTION-URL>sites/<YOUR-SITE-NAME>/SitePages/CustomLearningAdmin.aspx

Next, you will need to add owners to the learning pathways site. Owners will have admin privileges on the site, but also be able to hide and show content delivered through the learning pathways web part. In addition, they’ll have the ability to build custom playlist and assign them to custom subcategories.

  • From the SharePoint Settings menu, click Site Permissions.
  • Click Advanced Permission Settings.
  • Click Microsoft 365 learning pathways Owners.
  • Click New > Add Users to this group, and then add the people you want to be Owners.
  • Add a link to Explore the Site in the Share message, and then click Share.

Issues & troubleshooting the learning pathways solution

1. Configuration issues within learning pathways site

Once the learning pathways solution had provisioned and I received a success message, I went in and started poking around in the site to see if content loaded etc.

Once I then started shared the site with a few colleagues I got feedback that they were seeing this message within each page:

“Microsoft 365 learning pathways has a configuration issue. Please see the browser console for detailed logs. For assistance check out the issues list at https://github.com/pnp/custom-learning-office-365/issues.”

What I found was if you don’t click the link to initialize the CustomConfig List, all of the learning pathways content that’s delivered from the web part won’t work. I also then tried to go back and open the link to see if the problem would correct itself. It didn’t and the CustomLearningAdmin.aspx page just hung and wouldn’t respond.

What worked for me in the end was to permanently delete the learning pathways site, delete the learning pathways solution from the app catalog site, wait 24 hours then provision again (this was I could use the same URL).

Naturally this time around I initialized the CustomConfig List from the URL before sharing it!

2. Delete sites from recycle bin in order to provision again

So stemming from issue number 1 above, I also noticed that unless you permanently delete your learning pathways site, you cannot create one with the same name. You will get a message similar to the below:

“Unfortunately your site provisioning at least partially failed!”

To permanently delete a site, all you need to do is delete it from Active sites (if not connected to an O365 group), then under Delete sites select the site and press Permanently delete.

How to permanently delete sites in modern SharePoint.

3. Multi factor authentication enabled for the provisioning account

I had an issue where I kept receiving a generic message from the provisioning service page saying:

“Unfortunately your site provisioning at least partially failed!”

The global admin account I used to run the provisioning service had multi factor authentication enabled, more specifically using the authentication app. What I found was when I changed by 2-step verification from using the authentication app to text, the provisioning service completed successfully.

4. app catalog site takes longer than 30 minutes to allow provisioning to complete

If you don’t already have an app catalog created, you will receive an error from the provisioning service similar to this:

“In order to provision the template you need to have an App Catalog in your tenant. Please, create one (for instructions you can read this document: https://go.microsoft.com/fwlink/?linkid=2087251), wait up to 30 minutes, and try again.

When you then create an app catalog site, I found it took well over 2 hours before the provisioning service recognized as such.

How to create a custom ID for lists and libraries

In this example I demonstrate how to create a simple solution that allows users to submit a request to a list, then a workflow fires that updates the request ID field with our custom ID number.

ID numbers, reference numbers, ticket numbers…this is something that regularly gets asked to be a part of any SharePoint solution or request based system. My first thought when this is required is “easy, we can just use the SharePoint item ID column and use that”. However, creating a simple calculated column that leverages the in-built ID column is not as easy as it seems.

My first attempt at creating a custom ID column involved creating a new calculated column, and appending some text before the ID and then inserting the ID column into the formula, like this:

="REQ-00"&[ID]

The problem with this approach is that when new items are added, the ID appears to “slip” resulting in the custom ID column having no ID number being pulled from the SharePoint ID.

Custom ID column – modern SharePoint

1. Pre-requisites

Before you begin you will naturally need to create either a list or library in SharePoint, and the relevant apps checked as part of your O365 license.

2. The setup

  • Create a new column, with the type Number – I called this ‘solIncrementNum
  • Create a new column, with the type Calculated – I called this ‘solReqNum‘, later renamed ‘Request Number’
    • In the formula field, add the following: ="SOL-00"&[SolIncrementNum]
    • For the Data Type, select Single line of text
Setting the formula for the solReqNum column in list settings

NOTE: for the Request Number formula if you want to prefix your custom ID with something else just replace what’s between the ” “ in the formula field above.

3. Build the Flow

Flow action: when a new item is created

  • Create a new flow from the template “when a new item is created, complete a custom action”
  • Give your Flow a name, I called mine “Populate Solution Request Number”
  • In the “when a new item is added” step, make sure the site address and list name are the same as the list you built the custom ID column for earlier
Step 1 of the Populate Solution Request Flow

Flow: update item

  • Press + New step, start typing “update item”, select the update item action from the selection
  • Select the site in question, then copy and paste the List Name from the previous action
  • Make sure this action has the following fields set:
    • Id: ID
    • Title: Title
    • solIncrementNum: ID

NOTE: make sure that when you set these fields, that the values you use are coming from the “when a new item is created” action.

Step 2 of the Populate Solution Request Flow

Now when new items are created within the list or library, the flow will fire and create a new request number.

Modern SharePoint list with Flow that populates Request Number

Finding the task properties pane in SharePoint 2013 workflows

(this post was written using a SharePoint online environment and SharePoint Designer 2013)

So here’s the scenario, there is a central list where users add items and once submitted a workflow runs that assigns tasks to separate task lists. No big deal right?

The scenario

Task actions in SharePoint 2013 workflows are a pretty standard thing, the example above just assigns tasks to different lists (think HR, IT, Pensions) for work to be completed. The additional requirement I had was for these tasks to not send any system generated assignment emails when the tasks are assigned.

Example of creating & assigning a task in a SharePoint 2013 workflow.

The problem

This one really had me pulling my hair, but in a nutshell there is no obvious way to turn on/ off the emails that are system generated at the point which a task is assigned.

When you double-click on a task, an “Assign a Task” window opens. Within this window there is an “Email options” drop down, but this only has the email editor for the task creation email and the ability to turn on/ off the task overdue email(s). It doesn’t have any settings for switching on/ off the initial emails themselves.

The Assign a Task window doesn’t contain the properties to switch off system generated emails.

The hidden task properties pane

So at this point I began thinking there is no way to do this and the design for this process is now fundamentally flawed…until I right-clicked!

If you right-click on the list within the assign task action (the ICT Task List Members bit underlined in the example below) a menu will appear. Normally this menu contains some simple options like moving an action up or down. However, with task actions there is an additional option called “properties”.

Hidden properties button within the “assign a task” action.

After clicking on the “Properties” button, you’ll find an additional “Assign a Task Properties” window which contains the following, hidden properties:

Hidden assign a task properties window.
  • PreserveIncompleteTasks: set to true if you want non-completed tasks to be deleted when the task process is complete.
  • WaiveAssignmentEmail: set to false if you want to have an email sent out to the assignee when a task is created
  • WaiveCancelationEmail: set to false if you want to have an email sent out to the assignee when a task is canceled.

By default, all of these properties that are set to “no” or “false”, so will send emails based on the above parameters. To change, just click on the drop down next to each option and update to “yes” or “true” and the emails will stop sending!

Tales of a SharePoint migration – part one

The path to a trial migration

I’ve been suitably inspired by Andrew Warland’s fantastic two-part series documenting his approach and migration to SharePoint Online, so much so that I thought it would be a fun series to write about my own experiences.

Take a look at Andrew’s blog series here.

It is’nt my intention to necessarily document Microsoft best practice in this series, rather just to explore some of the challenges, sucesses and experiences I notice along the way.

The current situation

My organisation has recently made the decision to move to to the cloud, with O365 being the naturally preferred destination. SharePoint has been well embedded, and heavily used within the business for several years, with on-premises SharePoint 2010 currently in production.

Finally, in terms of the SharePoint architecture and data volume, there are only three web applications to merge together as part of the migration effort. However, there are several site collections within our main intranet web app, plus many sub-sites nested within them, meaning the huge database sizes behind these site collections could prove difficult come migration time.

A note on the new, flat structure

Our current environment has a well established top-down structure in place that is generally consitent across the environment.

Having already made the investment in ShareGate, this will be the tool of choice for the migration. In the version 11.0 release of ShareGate, a new restructure option now allows you to promote sub-sites to top-level sites post inital migration from the source SharePoint environment.

The new restructure option in ShareGate 11.0

Considerations for a successful migration plan

One of the biggest issues to be resolved before we can start any sort of migration activity, is the fact that we have several content databases well over the 200GB recommended general use size limit.

Microsoft best practice suggests that any environment that has site collections, sites, content databases, libraries or lists that exceed the software boundaries and limits should be remediated prior to any migration activity. In this case, the main idea is to split each content database that exceeds 200GB into seperate content db’s, and where neccessary, move or promote sub-sites to site collections and attach new db’s.

Armed with the knowledge of the recent restrcuture functionality coming to ShareGate, plus my own personal feeling that any remediation activities to our current environment may in of itself carry adverse risk to the estate we proposed a different approach.

Trial migration begins

With all the reporting capabilities at our disposal via ShareGate, I was able to get a firm grasp of what resides within each site collection in our environment, in terms of:

  • The size of each sub-site underneath the top-level
  • Number/ size of libraries and lists
  • Number of items in each of the above
  • Any workflows running in any of the above

From this I ran a trial migration of a sub-site from SharePoint 2010 to a newly created team site in SharePoint Online.

Pre-migration

Before I kicked off the migration, I ran the source analysis tool within the Migration > Plan section of ShareGate. I noted the following obersavations:

  • The source analysis within “migration” in the ShareGate tool, although listed as only being able to analyze up to SharePoint 2013, does in-fact work for 2010
ShareGate source analysis
  • The source analysis cannot run at the sub-site level, meaning that you need to run it at the site collection level then just filter down to the sub-site in question through the report itself
  • Source analysis gives you a report of all checked-out files within a source site.From this, I created a simple view within each of the libraries that contained checked-out files to send to the site owners for action

Post-trial migration

The trial migration completed successfully as expected, however there were several interesting results I noted:

1. Everyone receieves a welcome email

If you migrate the permissions, once the source permission groups migrate each user will recieve a welcome email to the new SharePoint Online site.

There’s no GUI control for this as of this time of writing, but you can switch off the email notifications via PowerShell.

2. /Pages/ or /SitePages/…that is the question

Publishing sites seem to be the trickiest to migrate, especially those with custom master pages or page layouts. When migrating publishing sites, the Pages library is migrated wholesail, meaning the content won’t reside in the SitePages library (where new client-side pages are located).

3. Un-editable modern homepage

After the migration had completed, the new team site homepage threw up an error every time you tried to edit it.

I tried some of the documented resolution steps found here, but none of them worked for me. My solution was to just create a new page to replace the broken homepage, add all the relevant webparts and make this one the new default homepage.

Transforming classic publishing site pages to client-side pages

Publishing site pages will all be migrated as classic SharePoint pages, without the modern look and feel of a client-side page. My understanding is that for publishing pages with custom page layouts, additional metadata or custom content types will need to be transformed via PowerShell and creating a custom mapping file.

(I’m planning on writing a seperate blog post walking through an advanced publishing page transformation in the near future)

Its also worth considering that in the release notes for ShareGate 11.0 it makes mention of the fact they are researching the ability to transform classic to modern pages, so that could well simplify this process in a future release.

Conclusion

Overall, I was happy with our trial migration and believe it is a viable approach for us to move from on-prem to O365. Some lessons learned for myself would be to consider and SharePoint permissions audit prior to migration to remove any unecessary permissions, send an inventory out to site owners aswell as checked-out files, all in the name of reducing the migration effort.

This will be an ongoing series of posts, which i’ll focus more the on the nitty-gritty of the migration effort than anything else, but as always if there is any feedback or suggestions on how to improve this site, please let me know!

Walkthrough: how to deploy spfx sample webparts

A while ago I did a short series on how to provision and deploy the SharePoint Starter Kit. From this, I thought it would be fun to detail how to take one of the many, great spfx web part samples available in the SharePoint GitHut repository and go through the steps involved to deploy it end to end.

As with my last series on the SharePoint Starter Kit and generally with all my posts my aim is to simplify and detail every step involved to show that you can these things working without huge effort of developer expertise, I am not a developer by any stretch of the imagination so hopefully putting all the pieces together is useful 🙂

spfx client-side web parts

All the samples are available in the sp-dev-fx-webparts repository on GitHub from the link below. For the purpose of this example, I am deploying the Modern Experience Theme Manager web part, as I wanted to test out how easy it makes applying, removing and updating custom themes (it does).

https://github.com/SharePoint/sp-dev-fx-webparts
https://github.com/SharePoint/sp-dev-fx-webparts/tree/master/samples/js-theme-manager

Pre-requisites

All of the pre-requirement steps detailed in part one of my SharePoint Starter Kit series are also required for deploying web parts. Make sure you have followed all the steps here before continuing:

How to provision and deploy the SharePoint Starter Kit: part one

Install GitHub

Before you can begin, it’s much easier to clone a repository from GitHub than downloading and extracting a zip file. I also couldn’t get the web part to open from the localhost workbench when I manually downloaded the code.

You can install github for desktop here: https://desktop.github.com/

NOTE: I originally wrote this walkthrough a while back, when I came to finish it up I tried to update by cloned repo but it just wouldn’t work. I just removed the repo from Github desktop, then deleted all the files from the /sp-dev-fx-webparts/ sub-folder and cloned from scratch and it worked.

Make sure a developer certificate is installed

If you followed my SharePoint Starter Kit series, you can skip this step as you’ll of already done it, but if not run the following to install a dev certificate: gulp trust-dev-cert

Step 1: get the webpart working locally

Clone repository/ run web part on localhost

Now we need clone and build the repository to start using the webpart sample. Clone the repository by following the steps below:

  • Open cmd prompt, then navigate to the samples folder > then the web part samples folder you wish to use for example:
cd \sp-dev-fx-webparts\samples\js-theme-manager
  • Run the following command to install the npm packages to build and run the client-side project
npm install
  • Run the following command to preview your web part in the SharePoint Workbench
gulp serve

Your browser should now open and a localhost version of SharePoint Workbench will allow you to add the web part and access the properties:

(When I first wrote this I was using a different webpart as an example)

NOTE: I tried this using IE at first, it didn’t open at all, so i just switched to using another browser and the workbench loaded just fine.

Test the web part in your tenant workbench

Copy the URL of the localhost workbench, open a new browser window and paste the URL but update it to reflect your sharepoint tenant, for example:

https://sstuff.sharepoint.com/sites/dev/_layouts/15/workbench.aspx

Step 2: package and (soft) deploy!

Package/ deploy the web part to your tenant

Now we have tested our web part is working locally and within the context of our sharepoint tenancy, we can now package our solution and deploy into our SharePoint environment.

  • If gulp serve is still running, press CTRL+C to stop it in cmd prompt
  • In cmd prompt, enter the following command
gulp package-solution
  • This command creates a package in the sharepoint/solution folder called something like “js-theme-manager.sppkg”
  • Navigate to your SharePoint Admin site, open the app catalog site, under apps for sharepoint, drag and drop your sppkg file
Drag and drop the sppkg file straight into apps for SharePoint
  • Press the deploy button on the pop-up window, notice the localhost domain is showing here, we will need to change this once we’ve tested our web part is working
  • Back to the console, run gulp serve to make the local assets available for the web part
  • Navigate to a site where you want to deploy the webpart, press the cog button, add an app
  • Select the webpart you just added (this might take a minute or two to be available)
Add the newly added app to your SharePoint site
  • Add your new webpart to a page!

Enable CDN for your tenant

Now we’ve deployed and tested the webpart in our SharePoint environment, we can update our solution to host the assets directly in our tenancy or a content delivery network .

  • Open PowerShell, connect to your SharePoint Online tenant using the following command:
Connect-SPOService -Url https://contoso-admin.sharepoint.com
  • Get the current status of public CDN settings from the tenant level by executing the following commands one-by-one.
Get-SPOTenantCdnEnabled -CdnType Public
Get-SPOTenantCdnOrigins -CdnType Public
Get-SPOTenantCdnPolicies -CdnType Public

spfx solutions can automatically benefit from the Office 365 Public CDN as long as it’s enabled in your tenant. When CDN is enabled, */CLIENTSIDEASSETS origin is automatically added as a valid origin.

  • Enable public CDN in the tenant by running the following command:
Set-SPOTenantCdnEnabled -CdnType Public
  • Confirm settings by selecting Y and then Enter

Step 3: ready for final deployment

Go back to the console, make sure you are still in the relevant web part project directory, end sure gulp serve by pressing CTRL+C.

  • Open explorer, then open the package-solution.json in a code editor, from the config folder and check you see the following:
"includeClientSideAssets": true,
  • Run the following task to bundle the solution:
gulp bundle --ship
  • Then, run the following task to package your solution:
gulp package-solution --ship
  • From the same sharepoint/solution folder, drag & drop the newly updated solution package into the app catalog again. As it already exists, press Replace
  • Check the domain now shows as SharePoint Online, rather than localhost
  • Make sure your updated app isn’t checked out, if it is – check it in
  • Navigate back to where you previously deployed the app, add it to a page and test that it works!

How to show the folder path of a file in library views

Introduction

This post looks at ways in which you can show the folder path of a file as a standalone column within a SharePoint document library view.

UPDATE: I’ve updated this post after some comments asking how to do this for modern SharePoint libraries. Click here for more.

Classic SharePoint

The scenario

A common request I get is:

How do I see what folders/ sub-folders my files are in at a glance

– all users everywhere

Out of the box, there aren’t any columns available that you could potentially leverage to display this information in a standard SharePoint 2010 library.

The solution

So, just by adding one value in SharePoint Designer, here’s how you do it:

  • Navigate to the library you wish to change, create a new view under Library Tools > Library > Create View
  • Choose the relevant format of your view, give your view a name and press OK
  • Open SharePoint Designer > Open the site > open the library you were just working in
  • In the Views pane > click to open the view you just created
In SharePoint Designer, clicking on the view name will open the view in edit mode
  • In the code editor window, scroll down until you see something like the following:
<ViewFields>
	<FieldRef Name="DocIcon"/>
	<FieldRef Name="LinkFilename"/>
	<FieldRef Name="Modified"/>
	<FieldRef Name="Editor"/>
</ViewFields>
  • Add the following field reference in between the opening <ViewFields> and closing </ViewFields>
  • Add the field reference in the display order you would like it to appear in the view
Add the field reference to the View Fields list
  • Press the Save icon to save your changes
  • Press the Preview button to see your view in action in the browser

Now you will notice there is a new column being displayed “Path”, that is showing us the full location of the file or folder in the libary. You’ll also notice that this path will display data when at the library root, or in any folders or sub-folders in the library.

Library root displaying a files path
File in sub-folder displaying relative location

Bonus

Taking this one step further, what if we wanted to show files of a certain type, then create a view that groups these files by their folder location? Guess what, that’s exactly what I did!

  • Navigate to your library > create a new view as before, this time base your new view off the one you just created
  • If you wish to only show files of a particular type, use the filter by settings (for example below is filtered to only shows Word documents)
  • Make sure “show all items without folders” is selected
  • Press OK
Filtering to only show word documents, also showing items without folders
  • Back in SharePoint Designer > Open up the view you just created
  • Scroll down until you see the opening <Query> tag and add the following beneath it:
<GroupBy Collapse="FALSE" GroupLimit="30">
	<FieldRef Name="FileDirRef"/>
</GroupBy>

Save and preview your view, it should now be grouping by the Path field:

I know this has proven really useful for my company, so hopefully this helps out someone else too 🙂


Modern SharePoint

The scenario

With Microsoft retiring SharePoint 2010 designer workflows, plus the movement away from SharePoint Designer in general, a few readers have asked for a solution that works with modern SharePoint.

When researching this I considered whether suggesting to use SharePoint Designer 2013, as the above solution would still work in SharePoint Online using SPD 2013. But, as Microsoft say themselves although SPD 2013 remains supported, it’s depreciated – so I decided to go in a different direction.

The below example walks you through how you can create a flow in Power Automate to update a file after it’s been created to have the folder path shown in the document library view:

The solution

For this solution you will need to have access to create Flows in Power Automate, as well as an existing Document Library created in SharePoint Online:

  • Navigate to the document library you wish to show the folder path for
  • Add a single line of text column to the document library > give it a name (I called mine FolderPath)
  • Under the ellipsis, press Automate > Power Automate > Create a flow
  • In Power Automate, either use an existing, relevant template or start from blank
  • The trigger action should be When a file is created (properties only)
  • Set the Site Address and Library Name where you want to add the folder path
  • Insert a new step > select Update file properties.
  • Set the following values for the update file properties step:
    • Site Address: same as previous step
    • Library Name: same as previous step
    • Id: ID
    • FolderPath: Folder path

NOTE: The FolderPath within the Update file properties step is the custom column we created earlier. The Folder path (highlighted in red) is dynamic content available within the step in the flow. The folder path dynamic content is the path to the folder the item is in, relative to the site address.

Ensure you select the system Folder path dynamic content to pull the right data into the custom FolderPath column.

Here’s the flow in it’s entirety:

At this point test and save your flow to make sure it is working as expected 🙂

Bonus #1 – turn your folder path column into a hyperlink column

So if like me you want to take this one step further, wouldn’t it be good if we could easily make our newly showing folder paths, actual hyperlinks to the folders? Well the good news is you can!

  • Navigate back to your document library > click on the FolderPath column > Format this column
  • Under Apply formatting to make sure FolderPath is selected
  • Paste the following JSON into the custom formatting box:
{
  "$schema": "https://developer.microsoft.com/json-schemas/sp/column-formatting.schema.json",
  "elmType": "a",
  "style": {
    "color": "blue",
    "font-weight": "bold"
  },
  "attributes": {
    "target": "_blank",
    "href": "='YOUR SHAREPOINT SITE URL' + @currentField"
  },
  "txtContent": "@currentField"
}

NOTE: for more information on turning field values into hyperlinks, check out this awesome sample from sp-dev-list-formatting.

  • Press Save
  • Your FolderPath column values should now be legitimate hyperlinks that click through to the relevant folders

Bonus #2 – update existing files in the document library

This was another suggestion from a reader with regards to how to update files that existed in the document library before the flow was created.

Running a flow manually for individual files

When I began to consider how to do this I started by looking at ways to manually start the flow.

It appears the only real way to do this is to create a new column that adds a button next to each file, that allows you to run the flow. I’m not really enamoured by this approach as it doesn’t seem ideal to have an extra column to run a flow showing on every file in your library. If this is something you would like to pursue then I would recommend this great article by WonderLaura who has the process of creating a button to trigger a flow covered!

Update our flow to update all files if folder path is empty

My solution to this problem was to update the flow we created earlier to get the properties for all files in the library, then add a condition that checks if the FolderPath column is empty, then if yes runs our flow as before.

  • First, I added a Get files (properties only) action which gets all the files from the source library
  • Then I added a new Condition action, which simply checks if the FolderPath column we created is equal to null. You will also notice a new Apply to each action will be created
  • I then moved the previous Apply to each action into the “If yes” condition
  • I left “If no” blank, as it is ok to leave a condition blank if you don’t want it to do anything

Here’s the updated flow in full, which changes highlighted in red:


Microsoft 365 update for April 2019

Another bumper post for April, in this months update:

Let’s get started!

SharePoint updates

Files restore for SharePoint and Microsoft Teams

Files restore offers a self-service recover solutionthat allows administrators and site owners to restore files from any point in time during the last 30 days. Look for a new “Restore this library” option within the library settings panel.

Files restore example for SharePoint document libraries
Find out more:

Modern Document Sets

Long awaited modern document sets will update the user interface to bring them inline with modern sharepoint. Document sets allow you to group related documents together using shared metadata. Modern document sets also unlock the same intuitive user actions like drag and drop content, link to content that lives outside the document set, pin files and much, much more.

Modern Document Sets in SharePoint
Find out more:

News Audience Targeting

Audience targeting is a new feature within the news and highlighted content web parts that enables authors and site owners to tag news articles with Azure Active Directory groups to filter content through web parts to people within those groups.

Find out more:

Author reply emails for comments, replies and likes

Now when someone comments on your page or news post, SharePoint notifies you via email. Multiple comments will be batched so that you receive a single email. This feature will start rollout to targeted release in April, with worldwide rollout currently scheduled to be completed in mid-June 2019.

Find out more:

Connected web parts for SharePoint

Coming soon are three new connected web parts for SharePoint Online that allow you to display data from list and library web parts. With the List Properties, File Viewer and Embed web parts you can now connect to a data source and interact with lists and libraries in new ways.

Find out more:

Multi-Geo in SharePoint Online and Office 365 Groups

SharePoint Online and Office 365 Groups now joins Exchange Online and OneDrive in having the ability to enable where SharePoint sites and their content is stored.

Multi-Geo in SharePoint and Office 365 Groups enables global businesses to control the country or region where shared resources like SharePoint Team Sites, Office 365 Groups content (associated SharePoint Sites and Groups mailboxes) are stored at-rest.

Introducing Office 365 Multi-Geo
Find out more:

Autodesk AutoCAD integration for SharePoint and OneDrive

New integrations with Autodesk connect OneDrive and SharePoint to the drafting tools available through AutoCAD. As you work with DWG files across these applications, you can open and edit them in the AutoCAD desktop application, the AutoCAD mobile app, and the new AutoCAD web app.

Find out more:

You can now use larger, more flexible image types to upload your company logo in the Office 365 navigation bar. You will be able to upload a custom logo of any file size/ format via a URL in order to improve the clarity of the logo image that your users see.

Find out more:

Office 365 Group card enhancements

Improvements to the Office 365 group “hover cards” so that you can act on the group within the context of what you’re doing, rather than going to a separate page. You can search through all group members, renew the group per any set expiry, and approve pending members.

Office 365 Group card enhancements
Find out more:

Microsoft Teams updates

Praise badges

Praise in Microsoft Teams is the new way to show your appreciation and encourage each other at work. Send in a 1:1 chat or post it to a channel for the entire team.

Find out more:

Teams PowerShell module GA

The Teams PowerShell module is now generally available. This PowerShell module allows you to manage the lifecycle of teams within your organisation.

Find out more:

Request to add on behalf of

You can now request on behalf of someone else to join a private team. Teams can be created as either private, where admins control membership, or public, where anyone in the organization is welcome to join.

Increased member limits

Organisation wide teams now have higher size limits, so they can have up to 5000 members in a team. Global administrators can easily create a public team that pulls in every user in the organisation and keeps the membership up to date with Active Directory as users join and leave.

Org-wide teams now have higher size limits

Show/ hide teams

It’s now much easier to keep your teams list tidy. What used to be Favorite and Remove from favorites is now Show and Hide. Choose which teams and channels you want to show in your teams list and hide the rest. You’ll still get notified when @mentioned, they just won’t clutter your teams list.

Hiding a team from a list view
Find out more:

OneDrive updates

Golden folder icon design

OneDrive is introducing golden folders with subtle, yet noticeable clues emblazoned on the icon to remind you of the contents and sharing status of each folder. Golden folders are being rolled out across mobile and web in OneDrive, SharePoint and connected experiences in other apps.

Golden folders in OneDrive and the OneDrive mobile app
Find out more:

OneDrive sync client improvements

The OneDrive sync client lets you can access and share all your files directly from your desktop in Windows File Explore or macOS Finder. Some new updates for the sync client include:

  • Self-help option: “Illegal files names not syncing” 
    A new in-app resolution to sync errors – like when using an Asterix “*” symbol or any file name starting with “~$” – to help avert and solve naming blockers, to then rename the file and continue with upload
  • Request assistance
    Look for a new “Get Help” option in the OneDrive activity center on your desktop. This enables people to initiate a support ticket.
  • Prompt for pending uploads
    And one last “wait, before you go” feature… the OneDrive sync client will also notify users when they have pending uploads when the computer is shutting down or going into standby
Find out more:

Block download option for specific people sharing link

You are now able to use the “Block download” functionality that allows people to block recipients from downloading, copying and pasting shared content when using the “Specific people” style sharing links.

Find out more:

Office client apps – required document properties updates

Users will now be able to save Office files with missing required properties. This change only applies to the Office files synced by the OneDrive sync client. Additionally, users can add, or update required properties for a document by navigating to the file in the SharePoint document library and entering the appropriate value.

Find out more:

Other, related updates

Yammer conversations & highlights web part

The Yammer conversations wep part enables you to integrate topics, groups or users into SharePoint. This combines the social nature of learning across organizations with the content and knowledge management powers of SharePoint.

The Yammer Highlights web part, provides a quick overview of active conversations and a targeted portal to specific groups or conversations in Yammer.

Microsoft Search in Bing Preview includes Yammer conversations ​

Yammer conversations or conversations between co-workers will now start appearing Microsoft Search in Bing. Microsoft Search will only return information and files that you have permission to see.

Find out more:

New icons in Office 365 apps

Microsoft have updated their available icon set, with nearly 350 new icons being added to choose from. You are able to rotate, resize, and recolor the icons without any loss in the quality of the image. You can also separate the icon into its components and use only the pieces you want.

Find out more:

Power BI web by example connector

The Power BI web by example connector allows customers to scrape data from HTML pages. It supports ingesting any data element on the page, beyond just HTML tables. You can now automatically suggest Power BI tables based on HTML element repetition patterns.

Find out more:

Custom assessments in Compliance Manager

Compliance Manager now allows you to create custom risk assessments of any application used in your organization. This customised assessments capability enables IT to import their own security and compliance controls into Compliance Manager, including those for corporate policy, local law, and industrial standards.

Find out more:

Security Policy Advisor

Office Security Policy Advisor is a new intelligent service, now available in preview, that uses behavior-based analysis to help IT admins to quantify the risks and benefits of applying a tailored policy, and monitor policy health over time, for their Office clients.

Admins can now deploy policies with a single click and easily update, or even roll back, policies.

Find out more:

Links and resources

Microsoft 365 blogNew in Microsoft 365 – April 2019
New in Microsoft 365 video – April 2019
SharePoint Roadmap Pitstop –
April 2019
What’s new in Teams –
April 2019
OneDrive Roadmap Roundup –
April 2019

Microsoft 365 update for February 2019

Take a look at some of the best bits for the improvements and enhancements to Microsoft 365 throughout February:

SharePoint

SharePoint Migration Tool updates

The SharePoint migration tool now supports migrating content types and managed metadata term stores for SharePoint Server 2013. Global tenant admin permissions are required to do so.

Also, many of the on-premises SharePoint web parts can be migrated into Microsoft 365. Examples being blogs, chart viewer, content search, list form, list view media plus many more.

You can now pretty much migrate every element of a SharePoint site that is most important to you such as web parts, pages and site navigation.

Find out more: full list of supported web parts 
Find out more: new and improved features of the SharePoint Migration Tool

Drag and drop to re-order the left-hand site navigation

You can now re-arrange the order of your site navigation elements with a nice, user friendly drag and drop gesture. This removes the multiple clicks involved in he ellipsis, move up or down options of old. This new gesture also works for dragging/dropping into a sub-navigation location.

Drag and drop the left-hand site navigation

Bulk check in/out

This one I’ve been waiting for awhile for! You will soon be able to check in/out multiple files at the same time form the modern ribbon in a document library.

Bulk check-in/out documents from a modern library

File signals

File signals or status icons are being added into SharePoint to add visual clues regarding the status of a file, such as check-out status, sharing, DLP blocks or missing metadata. This applies to modern lists and libraries.

File signals give visual clues regarding the status of a file

Column totals

A revamp of an old favorite, column totals and subtotals are coming to modern lists and libraries. These totals and subtotals are displayed in the footer. This is a welcome change from the old total count in classic views!

Modern column totals

Add columns between columns and drag and drop

You can now insert new columns in place between existing in and modern list or library view, plus move a column around by simply dragging the header to a new location in the view.


Adding a column between an existing column in a modern SharePoint list or library

Smarter file hover cards

The file hover card gives you a sneak peek into your most important files. Now, as soon as your hover over a file you will be able to see important stats like number of views, who’s viewed and who’s modified. This functionality is now being extended to almost all file types.

This new experience will also appear for files listed in your Shared by Me view.

Find out more: file hover cards are getting smarter and is now available for all file types!

Hover over a file in a SharePoint library or OneDrive folder to see more information about a file

Microsoft Teams

Priority notifications and message delegation

Priority notification alerts will notify a recipient to an urgent message on their mobile and desktop devices and repeat the alert every two minutes for up to 20 minutes, until a response is received.

Priority notifications in Teams

Also coming soon is message delegation. Message delegation enables a recipient to delegate messages to another colleague when they are unavailable.

Message delegation in Teams

Priority notifications are currently in private preview.

Find out more: New capabilities in Microsoft 365 empower healthcare professionals

Microsoft Authenticator

Microsoft Authenticator allows you to receive security notifications for important events on your personal Microsoft Account. When you receive a notification, you can quickly view your account activity to take action if needed.

Microsoft Authenticator can be used to add two-step verification for added security if needed. It supports fingerprint, face ID or PIN authentication.

Microsoft Authenticator

Find out more: Microsoft Authenticator app now sends security notifications

Links and resources