Bing Maps and SharePoint Online (part 2)

Posted by

Ok. I stand corrected. In my previous post ( I was wondering why I could not add the Bing Maps API key to my SharePoint Online environment. But one of my collegues ( helped me out.

It seems that you can add this key to your SharePoint Online tenant and get rid of the “unauthorized” message. Here’s some steps.

1. Get the key.

Very important this. Go to the Bing Maps portal ( and follow the steps to create a new key. It’s pretty straight forward. When done, you should see something like this.


You key will be presented at the bottom. In this case, it starts with “Aq” and ends with “tLE”. Copy this text.

2. Add the key to the SharePoint Online management shell script.

I will use the script from the earlier post for this.

$WebUrl = ‘
$EmailAddress = “”
$Context = New-Object Microsoft.SharePoint.Client.ClientContext($WebUrl)
$Credentials = Get-Credential -UserName $EmailAddress -Message “Please enter your Office 365 Password”
$Context.Credentials = New-Object Microsoft.SharePoint.Client.SharePointOnlineCredentials($EmailAddress,$Credentials.Password)
$List = $Context.Web.Lists.GetByTitle(“yourlist“)
$FieldXml = “<Field Type=’Geolocation’ DisplayName=’Demo Locatie‘/>”
$web = $Context.Web
$web.AllProperties[“BING_MAPS_KEY”] = “yourbingmapskey

And voila: your maps are presented in all their glory. Horray!




  1. Hi,
    I could create the new column, the map view is available. Thanks!
    The only problem, I cannot add the bing key due some permission issues. What kind of permission do I need?

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s