You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/general-development/how-to-set-the-bing-maps-key-at-the-web-and-farm-level-in-sharepoint.md
+27-10Lines changed: 27 additions & 10 deletions
Original file line number
Diff line number
Diff line change
@@ -11,19 +11,17 @@ localization_priority: Normal
11
11
12
12

13
13
14
-
Learn how to set the Bing Maps key programmatically at the web and farm level by using the SharePoint client object model and Windows PowerShell, to enable the Bing Maps functionality in SharePoint lists and ___location-based web and mobile apps.
14
+
Learn how to set the Bing Maps key programmatically at the web (SharePoint Server and SharePoint Online) and farm(SharePoint Server) level by using the SharePoint client object model and Windows PowerShell, to enable the Bing Maps functionality in SharePoint lists and ___location-based web and mobile apps.
15
15
16
16
## Prerequisites for setting the Bing Maps key
17
17
<aname="SP15Bing_prereq"> </a>
18
18
19
19
To follow the steps in this example, you should have the following:
20
-
21
-
22
-
23
-
24
-
- SharePoint, with administrative privileges.
25
-
26
-
20
+
21
+
- SharePoint - with administrative privileges at farm OR site collection level
- A valid Bing Maps key, which you can obtain from the [Bing Maps Account Center](https://www.bingmapsportal.com/).
28
26
29
27
> **Important:**
@@ -32,7 +30,7 @@ To follow the steps in this example, you should have the following:
32
30
## Code example: Set the Bing Maps key at the farm or web level
33
31
<aname="SP15Setbing_farm"> </a>
34
32
35
-
The Bing Maps key can be set at the farm or web level. To set the Bing Maps key at the farm level, you need administrator rights on the server; you can then add the key by using the SharePoint Management Shell. To set the Bing Maps key at the web level, write a console application that uses the SharePoint client object model.
33
+
The Bing Maps key can be set at the farm or web level. To set the Bing Maps key at the farm level, you need administrator rights on the server; you can then add the key by using the SharePoint Management Shell. To set the Bing Maps key at the web level, write a console application that uses the SharePoint client object model or leverage SharePoint PnP PowerShell.
36
34
37
35
38
36
@@ -59,7 +57,26 @@ The Bing Maps key can be set at the farm or web level. To set the Bing Maps key
59
57
> [!NOTE]
60
58
> When you use Windows PowerShell, the Bing Maps key can be set only at the farm level. If you want to set the Bing Maps key at the web level, you can set the key programmatically, as shown in the following section.
61
59
62
-
### To set the Bing Maps key at the farm or web level using the client object model
60
+
### To set the Bing Maps key at the web level with SharePoint PnP PowerShell
61
+
1. Open the SharePoint Online Management Shell
62
+
2. Connect to the site you want to add/update the Bing Maps key
4. If you receive an error regarding NoScript being enabled, you must disable it in the site. Then rerun step 3.
71
+
```cs
72
+
Set-SPOsite<SiteURL>-DenyAddAndCustomizePages0
73
+
```
74
+
75
+
> [!NOTE]
76
+
> Ensure you understand the implications of changing a site's NoScript Policy - https://docs.microsoft.com/en-us/sharepoint/allow-or-prevent-custom-script?redirectSourcePath=%252fen-us%252farticle%252fTurn-scripting-capabilities-on-or-off-1f2c515f-5d7e-448a-9fd7-835da935584f
77
+
78
+
79
+
### To set the Bing Maps key at the farm or web level using the client object model with Visual Studio
0 commit comments