This is an oldie but a goodie in my opinion, this post will show you how to use library filters in SharePoint to only show items/ files created, or modified by the current user.
The steps below will guide you through the process of updating the view of a list or library to only show items created or modified by the current, logged in user.
Open the list or library you wish to update
From the library actions ribbon > select the current view (for example: all documents)
Press edit current view
Scroll down the edit view page until you get to the filter section
Create the following filter:
NOTE: this example will only show items that were created by OR modified by the current, logged in user. If you want your filter to only show items where both these values are true, change OR to AND.
Press OK to save your changes
Now your view should have updated to only show items created by, or modified by the current, logged in user.
Considerations
This example is really simple and easy to implement and there isn’t any real impact on your users as nothing is technically being restricted, just filtered out of the default view.
The flip-side of this is that in of itself could be considered a limitation if there is information stored within the list/ library that requires limited permissions. I’ll go into the options available for this later in this post.
However with that said, depending on what permissions you have in place for your list/ library, you could use this approach to secure the contents too.
Consideration #1 – Views don’t change permissions
A “back door” to gaining access to all contents stored in the list/ library would be to use a different view than the set default view to access all items (for example: if you created a new view to follow the below method, but left the default view set to show everything).
The solution to this would be to apply this filter approach to the default view, make sure any other public views follow the same approach and make sure end users don’t have elevated permissions.
Consideration #2 – Ensure permissions are set correctly
The only way an end user could bypass this approach without any “all items” views available, would be if they had the permissions to do so. The permission that controls this is called the Manage Lists permission, which is only granted via the Edit, Design, Full Control, Manage Hierarchy permission levels by default.
If end users aren’t in these groups, your in luck!
Consideration #3 – list/ library contents is not searchable
If you are using views to filter who can see contents within your list/ library then you will need to ensure this setting is updated if the contents needs to be hidden (below example is a document library):
Press the cog button > library settings
Press advanced settings
Under Search > change allow items from this document library to appear in search resultsto No
Press OK
Update the allow items from this document library to appear in search results advanced setting to ensure items aren’t visible in search.
Consideration #4 – If it’s a list, enable item level permissions
With lists, in advanced settings there is an additional configuration option – item level permissions which allows you to specify which items users can read and edit.
As the heading implies, this consideration only works for lists in SharePoint as the functionality isn’t available out the box for document libraries. SharePoint Maven have written up what the two different levels of item level permissions you can set mean, which you can find here.
In this post we describe an issue observed within a SharePoint 2010 environment where files could not be uploaded or edited and users received a “nonexistent file or folder” message, plus explain how to resolve.
The problem
Reports started coming in from users that when they tried to upload files or edit properties within a single site collection they received the following error message:
The URL is invalid. It may refer to a nonexistent file or folder, or refer to a valid file or folder that is not in the current Web.
Over the course of a couple of days, the changed and instead of seeing the above error the window would just hang when uploading files/ editing properties and users would see a “processing” message:
Processing message appears and does nothing when users upload files/ edit properties.
In this example, there is one, very large document library that was most affected by this issue within the site collection. So the first thing I did was take a look at the files with no checked in version within the document library settings.
I found that there was close to 1000 files with no checked in version. When trying to open the checked out files page it took an age until finally opening. I was unable to take ownership of all of the files and check them in, but this didn’t make any difference to the issue.
We have set up nightly IIS resets on our web front end servers so overnight this took place in the hopes restarting the web services might help, but this also didn’t fix anything.
The solution
After the IIS reset, I began looking into the SQL server too see if space was the issue. Sure enough I found that one of the drives that hosted the content database related to the site collection in question had less than 10MB free space!
So for us the solution was a simple one, we increased the space on the full drive and the issue went away. Users are once again able to upload files/ edit properties within the site collection.
Other common suggested fixes to try
In writing this post, I researched many of the other suggested fixes for this issue – so here’s a list:
Recycle the application pools/ perform IIS resets on the SharePoint sites as required
Check the application pool username/ password has not expired
Ensure the database server has enough free space (1GB minimum)
This post describes how to update the site logo in a classic SharePoint publishing site, plus how it differs from updating the site logo and thumbnail in modern SharePoint sites.
In older versions of SharePoint Server, such as SharePoint 2010 or 2013, you are able to update the site logo of any site or site collection by opening up the site settings and accessing the title, description and icon settings under look and feel.
I recently migrated a SharePoint Server publishing site into SharePoint Online using the copy structure and content option within ShareGate Desktop. Aside from the migration being bloody brilliant (seriously, everything copies across and works the same! more on this in another post), one thing that didn’t work was the site logo.
Copy structure and content in ShareGate Desktop.
The migrated SharePoint site with broken site logo.
How to update the site logo for classic SharePoint publishing sites in SharePoint Online
So in my earlier example, I’d just migrated a publishing site into SharePoint Online and noticed that the site logo was broken and affecting some of the navigation links of the homepage.
This Microsoft article makes mention of how to change the logo, title and description of your SharePoint site. The article also states that if you don’t see this option, it may be that you don’t have permission to see it – well I’m the primary administrator of said SharePoint site so that isn’t the issue!
I figured out a way around it thanks to trusty old SharePoint URLs. Below is how I got to the page, but if you just want to go straight there just add _layouts/15/prjsetng.aspx to the end of your site URL.
Open your SharePoint Online site
Add _layouts/sitemanager.aspx to the end of your URL
Click on the drop-down icon next to your site collection name > Press General Settings
This is the title, description and logo page as described in the Microsoft article previously. From here you can upload your site logo and save it to update your classic publishing site. It’s also worth noting that once you update the site logo from this location, it will also be visible within the modern elements of your classic publishing site (for example Documents).
How to update the site logo in SharePoint Server
For SharePoint Server, follow the steps below to update the site logo:
Before you begin 💡
Make sure you have saved your site logo in a location that is accessible to all users of your site.
Within your site or site collection > Press site actions > site settings
Under Look and Feel > Press Title, description and icon
Under Logo URL and Description > enter the URL path of your site logo
Press OK
How to update the site logo in modern SharePoint sites
With modern SharePoint sites it is really easy to change the site logo. There are two types of site logo you can change:
Site logo thumbnail – appears in search, on the site card and where ever else a square logo is needed. Recommended size is 48 x 48px
Site logo – appears in the site header, which can be transparent or non-transparent. Recommended size is 64 x 64px
Add a new site logo
Navigate to the modern SharePoint site you wish to add a site logo to
Press the cog icon ⚙️ > Press change the look
Within change the look > Press Header
Scroll down until you see site logo thumbnail and site logo
Press Change on either the site logo thumbnail or the site logo
Select a relevant site logo from your computer and press open
Press Save
If you want to remove a site logo, just open the header > scroll down to the logos and press Remove 🗑️.
This post is to serve as a reference point for all the useful shortcut URLs in SharePoint that help admins and super users get their jobs done much easier.
There are several blog posts by others with these URLs in them, but I wanted to preserve them in my own blog for future generations! Most of these links have come from SharePoint 2010, so if you want them to work in differing versions just add a 14, 15 or 16 after the layouts folder to work in 2010, 2013, 2016 or SharePoint Online.
(this post was written using a SharePoint 2010 environment)
A while ago I was trying to find a way of getting a list of all user profiles that didn’t have a profile picture uploaded. I searched around online a bit and could only find examples that involved writing PowerShell which I thought was way to complicated a thing to do!
So this post will show how you can easily export user profile data from SharePoint, apply some excel filters to find all users without a profile picture.
This method applies to all on-premises versions of SharePoint, but also will work for SharePoint Online.
Get user profile data
To get started, open the Excel desktop app
Press Get Data > From Other Sources > SharePoint List
Enter the root site collection URL for your SharePoint environment
Press OK
Press the From SharePoint List option within Get Data in Excel.Enter your root site collection URL here.
This will open a navigator window, which will display all the available lists within the root site collection.
Scroll down until you find the UserInformationList
Click on it and a preview will load, scroll across the preview and make sure you can see the Picture column
Press Load
Make sure you select the UserInformationList and that the Picture column is visible.
NOTE: at first I was using the Get Data > From Web option but that only brought back the first 30 rows from the UserInformationList.
I didn’t want to increase the view limit as there are thousands of rows to display but I found that the way described doesn’t have that issue.
Now this will take a little while to download all the rows if you have a fair few users, but you’ll see when its finished in the right-hand Queries and Connections pane as it shows you the number of rows downloaded once complete.
Filter your data
The first thing to note about this data is that it does also contain some stuff you wont need. With my list data I noted that I had SharePoint security and domain groups, service accounts and other general use/ non-user accounts listed. Here are some of the filters and logic I applied:
Filter the Picture column to only show blanks
Filter the Content Type column to only show Person
Or filter the ContentTypeID to only show the corresponding Person content type ID
Filter SIPAddress to only show rows with an organisational email address
That’s all there is to it, a pretty quick and super easy way to get a list of all user profiles without a picture 🙂
Recently I came across an issue with a SharePoint 2010 publishing site. The site had a page on it that was being edited and after a series of web parts were added, crashed and would no longer load. An additional issue here was that there wasn’t another, recent version of the page to restore to.
So, in the steps below detail how I was able to access the page using web part maintenance mode and delete the problem web part:
Navigate to the problem page’s URL
At the end of the URL add ?contents=1
This will then open the problem page up in web part maintenance mode. From here you are able to close, restore defaults or delete web parts from your page
NOTE: make sure you page is checked out before trying this else you won’t be able to make any changes.
Select the web part(s) which you think are causing the issue
Now select to either close, reset or delete the web part. I chose delete
A warning message will appear > press OK
Modern SharePoint
When writing this post I wondered if this method of accessing web part maintenance mode still worked for modern SharePoint – the answer was no! When you try to open a modern page using ?contents=1 you get this:
Opening modern SharePoint pages in classic maintenance mode won’t work.
However, after reading this handy article from Microsoft about maintenance for client-side web parts in SharePoint Online I just switched my query to ?maintenancemode=true and it worked!
Modern web parts have there own query to append to the page URL to access maintenance mode.
Different to the classic example, modern web parts when in maintenance mode show summary, manifest and data tabs with information about each web part.
If you wish to delete a web part from this view you will need to edit the page and delete it from there, then republish like in the example below:
Deleting web parts in maintenance mode within a modern SharePoint page.
SharePoint URL’s
There are loads of URL’s that either I can never remember or haven’t come across that are listed here. However I wanted to keep a list of them on my site just for reference:
(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 notsend 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!
(this post applies to SharePoint 2010, 2013, 2016 classic sites)
So in this scenario, a user was unable to get new SharePoint 2010 sites to show in the top navigation, even though some where hidden. If this happens to you try the following:
Navigate to Site Actions > Site Settings
Under Look and Feel > Navigation
In Global Navigation > update the maximum number of dynamic items
Update the maximum number of dynamic items to show all your sites
That’s it! now all your sites that haven’t been hidden will be displayed in the global navigation.
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:
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 pathFile 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:
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:
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
Data retention and deletion…I’m sure this is a something that anyone involved in Office 365, SharePoint on information management in general gets fed up of saying since the recent GDPR legislation!
Recently we have been rationalising and cleaning up our data in preparation for moving to Office 365. We are starting with SharePoint as the first target repository or silo of content.
The general consensus is to delete files and folders over 7 years old unless there is a pre-existing data retention policy to adhere to. So the next task is to identify those files that fall within our threshold, and ultimately delete.
Luckily, we have Tree Size Pro and ShareGate so I was able to relatively easily identify the files in question (there were a lot!).
The setup
As our SharePoint environment is a) rather full; and b) rather old, I made the decision to incrementally delete files rather than en-masse to mitigate risk, targeting the lists/libraries containing the most out of date content. I started by creating a view in the first library – library A with the following parameters:
Standard library view
Filtered by Created Date if less than or equal to 01/01/2011
Folders or Flat: Show items inside folders Show this view: In all folders
(all other settings are left default)
Results this returned looked good, I could see folders and files in this view that matched the criteria – brilliant! Based on my previous statement I decided to delete in batches out of working hours, again to mitigate risk. I deleted first from library A, then from the first stage and finally from the second stage recycle bin all in this fashion.
The problem
I had permanently deleted around 50% of the total volume of content to be deleted from library A when we started to receive reports of current files being ‘missing’ from library A…not a good day.
After these reports were investigated they were indeed true. It turns out that when folders are included within a library view, folders that match the filter will be shown in the view, regardless of whether the files inside match.
We tested the view exluding folders and all the files returned matched the filter criteria. The same results were demonstrated from a SharGate report of the same nature. The report of all files over 7 years old brought back folders over 7 years old, but they also contained files that were newer.
Conclusion
At present, we are not entirely sure as to why these filters are not able to drill down past a top-level folder. It appears to be difficult to specify via view settings to only show files within folders, including the folder itself that matches the criteria.
We have decided to omitt folders from our reports and views going forward and to solely focus on files as this is the most reliable way we can delete files.
Bonus: for those of you with ShareGate, heres an example of my report we created to bring back all files over 7 years old, excluding folders. I ran this report across the entire intranet application over a weekend and it worked a treat 🙂