Ok. I stand corrected. In my previous post (https://alberthoitingh.wordpress.com/2014/04/04/connect-bing-maps-to-sharepoint-online/) I was wondering why I could not add the Bing Maps API key to my SharePoint Online environment. But one of my collegues (http://www.arjancornelissen.nl/) 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 (http://www.bingmapsportal.com) 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 = ‘https://yourtenant.sharepoint.com/sites/yoursite‘
$EmailAddress = “firstname.lastname@example.org”
$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!
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?
Not sure. But as this is an older post, I’m not really sure it still works as described…