How to restore a file deleted from a Microsoft Teams channel

pile of covered books

Microsoft Teams is the place where groups of people come together to communicate and collaborate. A large part of that collaboration is document storage, sharing, and co-authoring. In Teams, files can be found on the Files tab of each channel within a team.

Did you know the Files tab is actually showing you the contents of a SharePoint folder associated with that channel?

Because Teams files are stored in SharePoint, any file deleted from a Teams channel goes to the associated SharePoint site’s Recycle Bin. We need to go to that Recycle Bin to restore the deleted file from there.

Click to enlarge | The dialog that appears when deleting a Teams file shows us it’ll go to the (SharePoint) site Recycle Bin.

How to restore a deleted Teams file

To find the correct SharePoint site for the team in question, we first open the Files tab for the channel from which you originally deleted the file. Then choose Open in SharePoint. If you don’t see it, you may need to use the ellipsis (…) then select it as seen in the following screenshot.

Click to enlarge

Next choose Recycle Bin from the left-hand navigation menu.

Click to enlarge

Finally, select the file you deleted then choose Restore from the ribbon menu.

Click to enlarge

Idea: Add the Recycle Bin as a channel tab

If you’re part of a team that is frequently accessing the Recycle Bin, you can pin it as a tab in your channel(s). Start this by clicking the plus sign (+) to the right of your existing tabs.

Click to enlarge

Choose Website for the app (SharePoint apps won’t work for this particular idea).

Click to enlarge

Name the tab Recycle Bin, paste the URL to your site’s Recycle Bin, and click Save.

Click to enlarge

Now you can drag the new Recycle Bin tab right next to your Files tab and have them side-by-side.

Click to enlarge

How to enable and use audience targeting for SharePoint pages and news

anonymous person with binoculars looking through stacked books

Note: This article pertains specifically to SharePoint Online (M365).

Audience targeting can be used to surface relevant information and resources to specific groups of people throughout SharePoint. This post will focus specifically on enabling audience targeting on your site’s pages and news so that you can create individualized experiences for users based on their identity or role.

The overall process consists of three steps:

  1. Enable the audience targeting ability for all content in your Site Pages library.
  2. Specify the appropriate audience(s) for specific pages/news items within the library.
  3. Modify any existing web parts (news or highlighted content web parts) to enable audience targeting (simply meaning to utilize any audience targeting configurations that have been specified for the content surfacing in that web part).

Step 3 is not required if you only wish to have audience targeting “seen” on the SharePoint start page, mobile app, or other non-customized areas where news may surface.

How audience targeting works

If you specify an audience for content, it will be shown in relevant areas (SharePoint start page, mobile app, news or highlighted content web parts using audience targeting, etc.) to members of the audiences only. This is not a security feature – the content is still discoverable by other users – just not surfaced upfront conveniently for them.

If you are a member of an audience specified on a news piece, you’ll see that news wherever it’s being called up. If you’re not, you won’t see it but can still search or browse to find it.

If no audience is specified for an item, it will be shown to all users. Or if a web part (such as a news web part) has disabled audience targeting, any specified audiences on individual pieces will be disregarded and the content will be shown to all through that particular web part.

Here are the detailed steps to set up audience targeting:

Enable audience targeting for Site Pages (and news)

1. Go to your Site Contents > Site Pages library

2. Select the settings gear > Library settings

Click to enlarge

3. Choose Audience targeting settings

Click to enlarge

4. Check the box for Enable audience targeting and then click OK.

Click to enlarge

Specify an audience for SharePoint pages or news

1. Now return to your Site Pages library and select a page or news item to which you wish to add audience targeting.

Click to enlarge

2. Open the details pane (i icon) in the upper right

Click to enlarge

3. In the Properties section, enter up to 50 M365 Group names, user names or emails, etc. to whom the selected content should be targeted. Notice it also adds the specified audience in a column in the library. Your additions are saved automatically.

Click to enlarge

Modify web parts to utilize audience targeting where available

1. Edit the page on which you’ve placed a news or highlighted content web part.

2. Click the edit icon (pencil) on the particular web part for which you’re enabling audience targeting.

Click to enlarge

3. In the Filters section, toggle Enable audience targeting on.
(Note: News source must be This site or Select sites. Recommended for current user doesn’t have audience targeting settings).

Click to enlarge

4. Republish your page when ready.

This can take some time to fully update in your site, so check back after a while to confirm functionality.

After completing these three sections, you’ve now

  • allowed content within the pages/news library to be used in audience targeting scenarios,
  • chosen specific pieces to which you’ll apply audience targeting,
  • and modified the web parts where content will surface to utilize those pieces’ audience settings when appropriate.

Check out this article for more information on SharePoint audience targeting, including more than pages and news.

Solution: SharePoint Asset Library app type missing when adding new app to site

If you’re wanting to add an Asset Library to your SharePoint site but not finding it available as an option, chances are the Video and Rich Media feature for that site collection isn’t activated. This feature enables the asset library which is basically a modified document library but with metadata specific to rich media that can be auto-extracted such as width and height of images, duration of video clips, etc. Asset libraries are good for storing your audio, video, and image content types.

To enable it (as a site collection admin) go to Settings > Site Settings and choose Site collection features from under the Site Collection Administration heading.

Then scroll down and look for the Video and Rich Media feature. Click Activate.

As the description says, this will “[provide] libraries, content types, and web parts for storing, managing, and viewing rich media assets, like images, sound clips, and videos.” Once activated, you’ll now be able to add the asset library to your site(s) in that collection.

Add a thumbnail column for documents and media in a SharePoint Online document library

Mark Rackley recently tweeted about the ability to create a calculated column in SharePoint online document libraries that would automatically render thumbnails for documents. In the GIF from his tweet, it shows how this works for media files.

Naturally curious, I had to see how this worked for documents of .docx, .pdf, .pptx, etc. types. What I found is that it only currently supports some file types:

Supported file types (there’s likely even more I didn’t test):

  • Word (.docx)
  • PDF (.pdf)
  • Emails (.msg)
  • Images (.png, .gif, .jpg, etc.)
  • Media (.mp4)

Not-yet-supported file types:

  • Excel (.xlsx)
  • OneNote (.one)
  • PowerPoint (.pptx)

Create a thumbnail column in SharePoint Online document libraries

1. Add a new column to your document library (library settings > Create column).

2. Set the column name to Thumbnail. As for type, you have two options:

  • Leave type as Single line of text. Thanks to Dario Cassinerio for sharing that Single line of text type works as well as (and more simply than) Calculated set to [Title].
  • Mark Rackley suggests sticking with Calculated set to [Title] (see example screenshot) to prevent users from editing the text field in forms.

3. Click OK.

Supported file types will have thumbnails rendered (like .docx and .pdf in the example below) and others will just be blank (like .pptx and .xlsx in the example below).

Click to enlarge

Here is an animation demonstrating the entire process, start to finish using Single line of text as column type:

Click to enlarge

And another animation but using the Calculated column set to [Title] type:

Click to enlarge

Update a hyperlink or picture column in SharePoint using Microsoft Power Automate (Flow)

Setting a hyperlink column’s value using Power Automate is a bit different than setting other column types’ values. In SharePoint, a hyperlink column has two components – address and description. If you update this column type using Power Automate’s “Update item” action, your address and description are both set to the same value.

In SharePoint Designer workflows, we could do this easily with the usual “Set field” action:

But in Power Automate, we only get one field which maps to the URL/address part of the hyperlink field, and is duplicated as the description as well in SharePoint.

And if you’re thinking it could work with a comma, as some other field types might, it won’t. You’ll get “Enter a valid uri.”

To get this to work so we can set both address AND description as separate values, we have to use an HTTP request action instead of (or in addition to) the Update item action. This isn’t as complicated as it may sound. Here are the steps:

1. Add the Send an HTTP request to SharePoint action

2. Choose or enter your site for Site Address

3. Set Method to POST

4. Set the Uri to the following, changing List Name to your list’s name, and replacing [ID] with the ID field from dynamic content

_api/web/lists/GetByTitle('List Name')/items([ID])

5. The easiest way to set your headers is to copy and paste this text into the “Text mode” option as demonstrated in the GIF that follows.

{
   "Content-Type": "application/json;odata=verbose",
   "X-HTTP-Method": "MERGE",
   "IF-MATCH": "*"
 }
Click to enlarge

6. Lastly, in Body, you can copy and paste this as well, but:

  • replace List_x0020_Name with your own list’s name. _x0020_ should replace any spaces in your list name.
  • replace Hyperlink with the name of the hyperlink column’s name
  • replace Google with the label/description/clickable text you want for the hyperlink
  • replace http://www.google.com with the URL/address part of the hyperlink
{'__metadata': {'type':'SP.Data.List_x0020_NameListItem'},'Hyperlink':
 {'Description': 'Google',
 'Url': 'http://www.google.com'}
 }

Your final result should resemble this:

Click to enlarge

Test that out. When it’s working and you’re ready to take it to the next level, you can replace the static url (like Google’s in my example) with dynamic content. For example, you could create convenient one-click links to an item’s version history:

Click to enlarge
Click to enlarge

Workaround: Export to Excel not working in Safari, Chrome, or other non-IE browsers for SharePoint server list exports

The problem

If you’re using SharePoint online (O365) you won’t run into this issue. But for those of you, like me, who are still on SharePoint 2013 or 2016 you may have tried to use “Export to Excel” on a SharePoint list or library and received the following error message:

To export a list, you must have a Microsoft SharePoint Foundation-compatible application.

Clicking “OK” only redirects you to page that is most definitely not an Excel export:

The workaround

Using Internet Explorer to open and export your SharePoint list might be the simplest way to export your list. However, some are unable to use IE.

If you can’t download or use Internet Explorer (IE) you can still get your lists exported to Excel by working in reverse. Rather than export from SharePoint we are going to open Excel and import from SharePoint.

1. Open a blank workbook in Excel

2. Navigate to the Data ribbon –> Get Data > From Other Sources > From SharePoint List

Note: There are two SharePoint list options under Get Data. Do not select From Online Services > From SharePoint Online list (this option would be for O365 only and O365 users will not need this post’s workaround).

3. Paste the URL to your SharePoint site. You can paste the URL to the list you’re wanting to import, but delete everything after the site’s name in the URL.

4. Click OK.

5. Select Windows and leave credentials as the default “Use my current credentials” unless you have reason to access the list as another account (perhaps a service account which may be able to retrieve all items even with restricted item-level permissions).

6. Click Connect.

7. Find the name of the list you want to import, select it, and click Load.

Click to enlarge

8. Depending on the size of your list, this may take a while. Once imported, you’ll find all of your data as well as some SharePoint metadata associated with your list items.

Click to enlarge

While not ideal, it doesn’t take long to do and you do get the result you’re looking for (with a bit of cleanup, deleting unnecessary columns and such).

Some things to keep in mind:

  • Exporting from SharePoint using IE allows you to export a view.
  • Importing from SharePoint using Excel imports every single list item and column, regardless of view.
  • You’re only able to import items to which you at least have view permissions.

Solution: “Feature requires a browser that supports ActiveX controls” when importing spreadsheet to SharePoint

If you’re trying to import a spreadsheet as a new list in SharePoint, you’ll need to use a browser that supports ActiveX controls or you’ll get the error:

“This feature requires a browser that supports ActiveX controls.”

Chances are you’re running a browser other than IE, or you’re running IE version 11. ActiveX controls are not supported in IE11, or most browsers. We can work around this error message by having IE pretend it’s version 10 momentarily.

  1. Open SharePoint in Internet Explorer (IE)
    • Quick access: Hit Windows key, type IE, hit enter
  2. Press F12 to open Developer Tools and select the Emulation Tab
  3. Change Document mode from 11 to 10 (supports ActiveX). Page will reload so you can try again in version 10.

Now try to import the spreadsheet again and it will work fine, opening your spreadsheet and prompting you to select the table or relevant data for import.

Updated share link options for SharePoint files

You may have already seen some new options when sharing links to files in SharePoint (and OneDrive). Here’s what’s available in my tenant today:

If you use the “Anyone with the link” option (for anonymous access) you can choose a date on which the link will expire and access will no longer be granted via that link.

You can block people from downloading only if you uncheck “Allow editing” for the link types that support it.

Your basic options are to allow anonymous users (with or without an expiration date) to:

  • Edit & Download
  • View & Download
  • View Only

You can also easily share with people only in your tenant, even if they don’t have prior access, and choose whether they can edit, view and download, or just view.

People with existing access is useful just to Skype/Teams someone a quick link to get to the file. Their pre-existing permissions apply.

Finally, “Specific People” can allow you to share with external users but they must use the address you share with, as they’ll be sent a verification code to validate their identity. This adds a layer of security to otherwise anonymous share links.

Note: You may not be prompted to enter your email address if opened directly. But if the email is forwarded, user will be asked to verify email before they’re able to send a code.

“Notify your team” option when you upload files to SharePoint

A newer feature in SharePoint allows you the option to “Notify your team” after a new file is uploaded. Your upload process is the same, but then your “upload complete” dialog now has an additional option:

When you select “Notify your team” you’re presented with options like sharing with SharePoint groups, or just individuals manually entered.

When finished, click “Notify” and the intended recipients receive a link that only works for them when logged in.

If you attempt to share with someone not in your tenant, you will receive an error as you can only notify people with existing access.

For these external users, you can instead separately share via the usual “Share” dialog when a file is selected. Here you’ll also find a newer feature that allows for blocking downloads if the “Allow editing” box is unchecked. This would prevent people making edits offline and creating multiple versions in silos.

Speaking at SharePoint Saturday Cincinnati this Saturday | Oct 27, 2018

chrome_2018-09-09_11-33-13.png

I’ll be speaking this Saturday at SPS Cinci (#SPSCinci2018). I’ll be presenting my brand new, magical session on content management, archiving and retention for the third time this year. Don’t miss it!

SharePoint wizardry for content management, archiving & retention

Are your muggles muddying up your servers and site storage with duplicate files, pictures from a 2008 staff party and files named “April” in folders called “Jane’s stuff”? Learn how to most effectively destroy the 8th horcrux using out-of-the-box functionality in SharePoint brewed with bits of governance, content strategy and just a little help from SharePoint Designer to help automate processes. It’s just like magic!

Hope to see you there!