How to Use Bing Images as Custom Backgrounds in Teams Meetings

Bing’s Daily Photo can be a Nice Teams Meeting Background

Bing publishes a daily photo which it uses as the daily background for its home page. The daily photo varies from country to country and is usually a high-quality visually attractive picture. Some of the content presented by Bing is market-dependent too. For example, Figure 1 shows the Bing page for Ireland on December 8, 2020 with a scrolling set of local news at the bottom.

Bing's home page for Ireland on December 8, 2020

Teams meeting background
Teams custom background
Figure 1: Bing’s home page for Ireland on December 8, 2020

Figure 2 shows the same page as presented in the French market. The same background image is used along with some details from my Office 365 tenant presented above the local news. This happens when a tenant integrates Microsoft Search results in Bing.

Bing's home page for France on December 8, 2020
Figure 2: Bing’s home page for France on December 8, 2020

Microsoft Search in Bing

Clicking through to the search page makes other information from the tenant accessible. Figure 3 shows how a search for the term “Microsoft Search” locates a bunch of Teams conversations. If the term were found in a Yammer community, it would turn up here too. Results from matching files and sites are also located in the same way. The only major source of data which is not searched is email.

Using Microsoft Search in Bing to find Office 365 tenant resources
Figure 3: Using Microsoft Search in Bing to find Office 365 tenant resources

Office 365 content is presented in the Bing home page for other markets like the U.S., Canada, U.K., Germany, and Australia, but not in Switzerland, Belgium, Netherlands, and New Zealand. You can test your own country by including a country code qualifier with the Bing URL. For example, is for New Zealand while is for Canada. Of course, the inconsistency might be due to a rolling update across Bing to treat all countries in the same way.

Fetching Bing Images to use as Teams Meeting Backgrounds

Coming back to Bing’s daily images, some PowerShell code is enough to download the images and make them available for use as background for Teams meetings. In this case, the code downloads the images for the Irish market (en-IE). Change this to the market appropriate to your needs (for example, (fr-FR for France, en-UK for the UK, en-US for the U.S., and so on).

# Code to download background images files from Bing
$TeamsBackgroundFiles = $env:APPDATA + "\Microsoft\Teams\Backgrounds\Uploads\" 
$Market = "en-IE" 
# Check that the Teams background effects folder exists. If not, create it
If (-not (Test-Path -LiteralPath $TeamsBackgroundFiles)) {
    Try {
        New-Item -Path $TeamsBackgroundFiles -ItemType Directory -ErrorAction Stop | Out-Null
    Catch {
        Write-Error -Message "Unable to create directory '$TeamsBackgroundFiles'. Error was: $_" -ErrorAction Stop }
    Write-Host "Folder for Teams background effect files created: '$TeamsBackgroundFiles'" }
Else {
     Write-Host "Teams background effects folder exists"
# Download the last seven days of Bing images
CLS ; For ($i=0; $i -le 7; $i++) {
  $BingUri = "$i&n=1&mkt=$Market"
  $BingResponse = Invoke-WebRequest -Method Get -Uri $BingUri
  $BingContent = ConvertFrom-Json -InputObject $BingResponse.Content # Unpack content
  $BingBackgroundFile = ""+$BingContent.Images.Url
  $BingFileName = $BingContent.Images.UrlBase.Split(".")[1]; $BingFileName = $BingFileName.Split("_")[0]+".jpg" 
  $TeamsBackgroundFile = $TeamsBackgroundFiles + $BingFileName
  If (([System.IO.File]::Exists($TeamsBackgroundFile) -eq $False)) { 
     # File isn't there, so we can download
     Try {
         Invoke-WebRequest -Method Get -Uri $BingBackgroundFile -OutFile $TeamsBackgroundFile 
         Write-Host "Downloaded" $TeamsBackgroundFile
     Catch {
        Write-Host "Error occurred when downloading from Bing"}
     } #End If
} #End loop

A longer version of script can be downloaded from GitHub. This version cleans up background files downloaded from Bing after 30 days to keep the number of files to a reasonable number.

Using the Bing Images as Teams Meeting Backgrounds

Once the Bing images are downloaded, they can be used like any other of the Microsoft-provided or custom background images. Figure 4 shows the Bing image featured above being chosen as a custom background for a Teams meeting. As shown, the image is reversed, but it will appear as normal when projected to other meeting participants.

Choosing a Bing image as a Teams Meeting Background
Figure 4: Choosing a Bing image as a Teams Meeting Background

To ensure that users download images from Bing regularly, you can create a scheduled job to run the script when a PC starts. The exact details of how to do this will differ from organization to organization.

The information presented here is based on the content of this post. An earlier version of this content and script was included in the post covering using background images with Teams meetings. We decided to move the text to a separate post to present more context and make some improvements in the GitHub script.

The Office 365 for IT Pros eBook has lots of information about things like Microsoft Search and Teams meetings. Details like those covered here are interesting, but barely get a mention in the book. We have lots of other things to discuss which are more important for tenant management.

2 Replies to “How to Use Bing Images as Custom Backgrounds in Teams Meetings”

  1. Hi Tony, thanks for the script, but I think you made a small error 😉
    $RemoveDate = Get-Date.AddDays(-30) should be $RemoveDate = (Get-Date).AddDays(-30) (on my system anyways 😉

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.