Bing Maps Pune

Set Bing Maps API Key in SharePoint


In order to use the full feature of the SharePoint Geolocation column, we need to first set the Bing Maps API Key in our SharePoint environment.


Before jumping to the solution, here’s a quick note

We first need to obtain the Bing Maps API Keys in order to use them. You can learn more about how to obtain this key here.

Once we have our key, we need to set the same into our SharePoint environment. In this respect, we’ve couple of options

  • Set this key at the Farm level. This will make it available for every Site Collection.
  • Set this key at the Site Collection level thereby, making it available for the given Site Collection only.

Set the Bing Maps key at the site level

We can use this option to set this key at the web level. This will limit its usage to this particular site only.

In order to run this cmdlet, SharePoint Online PnP PowerShell module needs to be pre-installed on the machine.

Launch, SharePoint Online Management Shell and, run the below cmdlet.

Connect-PnPOnline -url "SITE URL"
Set-PnPPropertyBagValue -Key "BING_MAPS_KEY" -Value "Your Bing API Keys"

If scripting is disabled on the given site then, you might receive a NoScript enabled error. You can check out the workaround to this issue here.

Set the Bing Maps key at the farm level

Again, launch the SharePoint Online Management Shell and run the following cmdlet.

Connect-SPOService -Url <TenantAdminUrl>
Set-SPBingMapsKey -BingKey "Your Bing API Keys"

Once, we have set the key, we can start previewing the Geolocation data in actual Bing Maps.

SharePoint Geolocation

Key Takeaways

  • The first step is to obtain the actual Bing Maps API key. You can refer this post to learn more about it. This is important as this API is not free and there’s a pricing component attached to it.
  • In case you encounter the NoScript error, kindly check the workaround here.

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 )

Twitter picture

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

Facebook photo

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

Connecting to %s

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