Modern Search Results and file shares

September 25, 2020 - 10:30, by Steven Van de Craen - 0 Comments

In an hybrid search environment the Cloud Search Service Application indexes local file shares and ships the index to SharePoint Online for querying. If you are indexing a local file share then you’ll notice something funny with those search results in Modern Search in SharePoint Online.


As you see the Modern Search just renders the result as non-clickable. Now you could still use Classic Search, but then it would get blocked if you click on it in a modern browser (which you should) due to security concerns.


Not allowed to load local resource: file://myserver/testfileshare/test.txt


The first issue (the visualisation in Modern Search) could be handled by using your own Modern Search results, for example via the PnP Modern Search Solution or use classic search result pages, so I’m not digging into this. The second issue however is generic and requires some thought.


I have seen environments that link directly to file servers for content and ideally that content would be moved into the environment. But there are still valid reasons for file shares and organisations may want to expose them to users through search. So for those cases you would need to find a solution. Here’s what I came up with…

  1. Use Internet Explorer; ugh. I can’t recommend this anymore but since it technically solves the issue so I’m adding it to the list.
  2. Start the browser with a flag to allow loading local resources (eg Chrome used to have --allow-file-access-from-files but this no longer works); it cannot be enforced for external users (if applicable) and it doesn’t feel like the right approach.
  3. Use a browser extension; there are browser extensions that restore the functionality when clicking on a file:// link. The issue I have with extensions is are they safe and trustworthy?
  4. Use Microsoft Edge IE Mode; users still use a modern browser but specific sites will use the IEMode. It would be a shame to have your entire “modern” SharePoint Online environment to run in IE Mode, no? Also it cannot be enforced for external users (if applicable)
  5. Put a web server or application in front of the file share; it shows the directory and file structure of the file share with authentication to ensure results are properly shielded
  6. If you have any other suggestions or solutions feel free to let me know


So let’s go with number 5 on the list. Now I want to have my search results coming from the application.

  1. Either the application supports being crawled directly as a website by SharePoint Search, and you just configure the Content Sources as such
  2. Or it may be possible to configure Server Name Mappings to transform the original file share UNC path
    Run  crawl and voila the search results are transformed into a web url


In either case your search results would now be coming from a web application and you won’t have the issue anymore.

So, what’s your take on this?

Cannot add comments to Microsoft Planner

March 12, 2020 - 16:10, by Steven Van de Craen - 0 Comments

At one of my customers we recently switched to using Microsoft Planner for basic task management and follow up of our team.

When I tried to update several tasks assigned to me I noticed an issue with posting comments:

You no longer have access to "a2e47746-ab52-4774-bba0-905b138c5c7f". Technical details

Correlation Id: 72bb4c8e-f5bb-4f8d-8e3c-03630559263e

Time Stamp: Thu, 12 Mar 2020 11:08:52 GMT

I could change other properties of the task without issues.

Planner Comment Error


FIX: The issue was that my account didn’t have a subscription, more importantly I needed an Exchange Online mailbox. Once that was provisioned the issue was resolved!

Open document in browser, open document in client

February 6, 2019 - 12:40, by Van de Craen Steven - 0 Comments

"Hey I have a link to a Word document in a SharePoint document library and I have this link on a page to it that I want to open directly in the browser [Word Online]."

"Sure no problem, just append ?web=1 to the link"

"Wow, cool! Can you do the same for opening directly in Word?"


Just linking to the document would offer it as download


I considered a complex hyperlink with an onclick handler that would then open it in Word etcetera etcetera, very convoluted and a thing from the past really.

Then I found out about the Office URI Schemes:

  • ms-word:ofv|u|https://mysharepoint/mylibrary/mydocument.docx
  • ms-word:ofe|u| https://mysharepoint/mylibrary/mydocument.docx

ofv = open for view, ofe = open for edit

You can read up on them here:

Even works in emails if you can construct the hyperlink href yourself. In a simple text mail it will not detect as a hyperlink and just render plain text.


Must admit that was a TIL.


OneDrive sync client and green locks (read-only sync)

December 7, 2017 - 15:31, by Steven Van de Craen - 0 Comments

The issue

I recently ran into an Office 365 environment where all users were seeing green locks on files and folders synched with the OneDrive For Business client.

OneDrive read-only sync

If this isn’t expected, in cases where the user should definitely have write access to these files you might want to check the following Library Settings:

Require content approval for submitted items?

Go to Library Settings > Versioning:

 Content Approval

If your library has this enabled than OneDrive will only sync in read-only mode. If you disable this setting your sync client should inform you that you now have read-write access and the green lock icon should be gone.

OneDrive read-write message 

If it doesn’t then please read on.

Require documents to be checked out before they can be edited?

Go to Library Settings > Versioning:

Require Check Out

Another feature that’s not compatible with the full OneDrive sync experience. Again as before, you will have to disable this and it should resolve immediately. If not then continue reading…

Required Columns

Go to the Library Settings and check the columns:

Library Columns

Check with the columns on the library, if any of them are “required” this will cause a read-only sync. In the screen this is the case for my ‘Department’ field.

Wait a minute! Does this mean we lose the ability of having required metadata ???

Well, luckily NO. You just have to use a different approach and use Content Types.

The solution

Go to the Library Settings > Advanced Settings:

Allow management of Content Types


Content Types are a great way to have different types of content, each with a different set of metadata, workflows, template, and more. You should familiarize yourself with the concept of Site Columns, Site Content Types, List Columns, List Content Types, Content Type Inheritance, etc. It really depends on the use case but in my example I just modified the List-level Column and Content Type, in other cases this may not be the best approach. If you’re looking for more information on Content Types you can easily find this on the web.


To make your field required go into the Content Type (you can click on its name) and configure each field as optional, required or hidden.

List Content Type Information


The result is that the field/column itself is not configured as Required, but it is configured Required for the Content Type. And when uploading documents of that Content Type the user will still have to provide a value for the field.

Edit Item


Almost there…

If you followed the above steps you’ll still be having the original issue. This is because in the background the field will still be “Required”. And if you have Content Types enabled you won’t be able to change this setting because the UI hides it from the List Column Settings!

Here are a few options to resolve this situation:

  1. If you are using Site Columns then you can change the “Require” setting and push the change down to lists and libraries. This is quite easy to do but will impact all lists and libraries where this is used. You’ll have to inspect those lists to see if they have Content Types enabled (and that the Content Type requires the field) or users will no longer have to specify a value (= functionality change)
  2. You can disable Content Types on the Library, change the List Column setting and re-enable Content Types. This is also easy to do from the UI. All Content Types will be preserved during the operation but some users might be impacted during the operation. Afterwards, verify per Content Type which fields should be required.
  3. Use CSOM or PowerShell to directly manipulate the List Column settings.


Options (2) and (3) are rather similar, but if you prefer the latter here’s a PnP PowerShell script that should assist you. I like PowerShell because it is transparant and can easily be viewed and modified. And I like PnP and its CmdLets because it really abstracts complex operations. Note that you will have to install the PnP CmdLets first.


cls ## Variables $userName = "yourusername" $siteUrl = "yoursiteurl" $listName = "yourlistname" ## Script start if (!$cred) { $cred = Get-Credential $userName } Connect-PnPOnline –Url $siteUrl -Credential $cred ### $web = Get-PnPWeb $list = Get-PnPList $listName ### QUERY OR CHANGE $bChangeField = $false Get-PnPField -List $list | % { $f = $_ # List all required fields, except the built-in FileLeafRef field which is required but by design if ($f.Required -and $f.StaticName -ne 'FileLeafRef') { Write-Host ($f.StaticName) -ForegroundColor Red if ($bChangeField) { Set-PnPField -Identity $f -Values @{Required=$false} Write-Host (" -> updated") -ForegroundColor DarkYellow } else { Write-Host (" -> reporting only") -ForegroundColor DarkYellow } } }

The script has a flag to control the actual field update vs reporting only.

After running (with actual update) it should resolve the issue.

OneDrive read-write sync

if it doesn’t I’d be interested to hear about it in the comments!


Some list settings are not compatible with the OneDrive sync experience and make it a read-only sync. You can disable these via the UI or via code/script.

Importing a Summary Links Web Part: List does not exist

October 23, 2014 - 15:23, by Steven Van de Craen - 2 Comments


Consider the scenario where you have a Summary Links Web Part (part of the SharePoint Publishing functionality) configured on a page and you want to import the preconfigured Web Part on a different page on a different site. If you try this you’ll get “List does not exist”:


Note that importing the Web Part in the same site (same or different pages) works just fine.


This is because the Summary Links Web Part references the list that contains the page where the Web Part resides on. If you open the .webpart file in a text editor you’ll see ListName and ListId containing the GUID of that list. So it can be the “Site Pages” library, the “Pages” library, or any Document Library that has Web Part Pages.


You can verify this by navigating to the following URL (note to replace the actual GUID): http://sitename/_layouts/listedit.aspx?List=GUID

Bonus question: what is the value when the Summary Links Web Part is on the “default.aspx” of a site? Answer:



So what’s the solution? Just remove the ListName and ListId elements (or their values) from the exported .webpart file and you’ll have no issues importing it to other sites.


SharePoint 2013: Bulk Content Approval of list items fails if user has read permissions on the web

October 17, 2014 - 16:51, by Steven Van de Craen - 1 Comments



Issue is still present in May 2015 Cumulative Update and July 2015 Cumulative Update. Will contact Microsoft on this.


Microsoft has confirmed this issue and will roll out a fix in the next Cumulative Update.


Last week I was notified of an issue where bulk content approval failed for specific users. The list was configured with the default Content Approval.


They would select two or more items to approve and click the “Approve” button in the Ribbon, however that just kept “Working on it”.


Note that single item approval works just fine for them!


When watching with Fiddler and in the ULS logs it was clear that the bulk approval screen threw an Access Denied.



The user was configured with Read permissions on the site and Approve/Contribute permissions on the list (but even with Full Control on the list it failed).


After some playing around with the permission levels and permissions on the web level, it turns out that if the user has “Approve” permission on the site level it works!!image

Obviously this may not be possible to grant to your users.


None so far. This was tested on Service Pack 1 (15.0.4605.1000) and September 2014 CU (15.0.4649.1001) individually.

For now either use single item content approval or give the user the “Approve Items” permission on the site level as well (workaround above).