All posts in Troubleshooting

How to Resolve SharePoint Search Not Returning Any Results

SharePoint Search Not Returning Any Results

Today in our test environment I ran into an issue in which SharePoint search was not returning any results when queried.  Well that’s not true.  It returned an error.  That’s a result right?  When returning the results the error: “Search has encountered a problem that prevents results from being returned.  If the problem persists, please contact your administrator”.  It also provides a correlation ID (very helpful).

SharePoint Search Not Returning Any Results - SearchError

Read more

SharePoint 2013 Workflows Failing Immediately After Starting

I have been working on an issue at my client site for a while around SharePoint 2013 workflows failing immediately after starting.  When they failed the error from the WF status screen contained:

Details: An unhandled exception occurred during the execution of the workflow
instance. Exception details: System.ApplicationException: HTTP 401
{“error”:{“code”:”-2147024891, System.UnauthorizedAccessException”,”message”:{“lang”:”en-US”,”value”:”Access
denied. You do not have permission to perform this action or access this

Pretty self explanatory I thought when I first started working on it.  The user starting the WF didn’t have the necessary rights to one of three key places: the list containing the workflow, the workflow tasks and history lists or workflow.aspx (found in /<site>/_layouts/15/workflow.aspx).  Checked those locations and the user had the necessary access.  So started digging a bit deeper.

Up to this point I had been using active directory groups for all user access to the site.  I decided to start using individual users as this would allow for easier testing.  Suddenly things started to work just fine.  Workflows would initiate and complete as expected.  After a great deal of more testing it was determined the problem was that SharePoint 2013 WFs wouldn’t work with AD groups at all.  We could give the group full control of the site, but any user contained within could not kick off a workflow.  While investigating I came across a support forum post going on a couple of years that had a number of people with the same problem as we were experiencing (you can review the forum post here)

To make a long story short, the problem finally was determined to be the AD groups we were using in the SharePoint sites were not being pulled into SharePoint.  We had Users and Groups selected within our UPS so everything should have been pulled in.  To determine this I ran a query against our UPS profile database.

Quick disclaimer: you void your warranty by changing the SharePoint DBs directly.  This query does not make any changes and it was provided to me by Microsoft so I can’t take all the credit ;-p

 -- Return group members (all members of a specific group)

  select mg.displayname as GroupName, mg.Id as GroupID, mg.SourceReference as GroupDN, upf.ntname as UserName, upf.PreferredName, upf.RecordID as UserID from userprofile_full upf

  join usermemberships um on upf.recordid = um.recordid

  join membergroup mg on um.membergroupid = 

  where mg.displayname like '%SharePoint_Testers%'

  order by mg.displayname, upf.ntname

When I ran this query nothing came back.  However, when I ran the query again after removing

 where mg.displayname like '%SharePoint_Testers%'

all kinds of groups came back.  They were all contained withing the Users OU of our AD.  The groups we use for SharePoint are in their own OU.  We had earlier confirmed the UPS settings had the SharePoint OU selected, but based on this it appeared to not actually be pulling them in.

The final fix?  We simply unchecked and rechecked the OU we wanted and reran the UPS sync.  Ran the above query again and the database now had all the groups and the members of the groups within it.  I tested the workflows again and running them as I had planned (with AD groups).  Everything ran fine.

I have said it before and will say it again: SharePoint User Profile Services is the flakiest service within SharePoint.  I haven’t played with it yet in SharePoint 2016, but I hope they have made more improvements beyond replacing FIM.

I hope this solution helps you.  It certainly helped us when we didn’t expect a nice fix.


Thanks for reading!!

Unable to Uninstall SharePoint 2013

The Problem

The other day I was attempting to fix what appeared to be a configuration issue with our farm.  We were receiving version mismatch errors when running code within our farm.  It turned out there was two problems.  First the farm did indeed have a misconfiguration (I am writing about that one separately) and it was found one of our servers in the farm wasn’t functioning properly due to a recent patch not applying properly.  This post discusses the steps I took and the end result.

Read more

Stop Looping through Sites and Lists in SharePoint There are Better Ways

I recently received a request at my client site to review a custom built feature that was no longer responding\functioning properly within our SharePoint environment. The feature was designed to copy selected files from a project site to the team site of the group whom would be taking over daily operations of the project once the solution was in production. Once copied the documents were declared as records within our Record Management System. The process was to select the files to be moved and then from the ribbon select the option to set the destination. This is the part that was not working.

Read more

Unable to rename SharePoint Folder

The other day a user at my client site called me up as they were unable to rename a folder within their environment.  We won’t get into folders and SharePoint now, that’s a post for another day.  Whenever they tried to delete a folder they received the following message: Error: Invalid file name. The file name you specified could not be used. It may be the name of an existing file or directory, or you may not have permission to access the file.  The error was received in both the GUI and Windows Explorer.

I had never encountered this error message before so to Google I went.  There’s a lot out there and it mostly is around custom development.  So we tried some of the usual troubleshooting:

  • Can she rename the folder?
    • Yes
  • Can she add files to the folder?
    • Yes
  • Can she delete files?
    • Yes

However, she couldn’t delete one particular file in the folder.  And neither could I with my Site Collection Admin access.  She couldn’t rename or delete the file.  So none of the suggestions worked that I came across on the internet, but I do have a solution, so if none of the suggestions are working that you have reviewed give this one a try:

Check to see if the user has the file inside the folder open.

If the file is open then you won’t be able to rename or delete the file, nor will you be able to rename the folder.  It certainly would be nice if the error received actually had something to do with the problem occurring (I realize it kind of does, but let’s be honest.. not really)