Skip to content

Commit edfa47c

Browse files
committed
Initial Content Security Policy cmdlet documentation
1 parent 384448f commit edfa47c

File tree

4 files changed

+202
-0
lines changed

4 files changed

+202
-0
lines changed
Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
---
2+
external help file:
3+
Module Name: Microsoft.Online.SharePoint.PowerShell
4+
online version: https://learn.microsoft.com/powershell/module/sharepoint-online/add-spocontentsecuritypolicy
5+
applicable: SharePoint Online
6+
title: Add-SPOContentSecurityPolicy
7+
schema: 2.0.0
8+
author: jaobrie
9+
ms.author: jaobrie
10+
manager: ryannak
11+
ms.reviewer:
12+
---
13+
14+
# Add-SPOContentSecurityPolicy
15+
16+
## SYNOPSIS
17+
18+
Adds an entry to the Content Security Policy configuration.
19+
20+
## SYNTAX
21+
22+
### Default
23+
24+
```powershell
25+
Add-SPOContentSecurityPolicy [-Url] <String> [-Directive] <String>
26+
```
27+
28+
## DESCRIPTION
29+
30+
Adds an entry to the Content Security Policy configuration.
31+
The url in each entry will be added to the corresponding directive during construction of the Content-Security-Policy header.
32+
Entries with a "*" directive will be applied to all directives.
33+
34+
## PARAMETERS
35+
36+
### -Url
37+
38+
Url to allow as part of this Content Security Policy entry.
39+
40+
```yaml
41+
Type: String
42+
Parameter Sets: (All)
43+
Aliases:
44+
Applicable: SharePoint Online
45+
46+
Required: True
47+
Position: Named
48+
Default value: None
49+
Accept pipeline input: False
50+
Accept wildcard characters: False
51+
```
52+
53+
### -Directive
54+
55+
Directive to allow as part of this Content Security Policy entry.
56+
Currently allowed values are "*", "script-src" and "worker-src".
57+
58+
```yaml
59+
Type: String
60+
Parameter Sets: (All)
61+
Aliases:
62+
Applicable: SharePoint Online
63+
64+
Required: True
65+
Position: Named
66+
Default value: None
67+
Accept pipeline input: False
68+
Accept wildcard characters: False
69+
```
70+
71+
## RELATED LINKS
72+
73+
[Get-SPOContentSecurityPolicy](Get-SPOContentSecurityPolicy.md)
74+
75+
[Remove-SPOContentSecurityPolicy](Remove-SPOContentSecurityPolicy.md)
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
---
2+
external help file:
3+
Module Name: Microsoft.Online.SharePoint.PowerShell
4+
online version: https://learn.microsoft.com/powershell/module/sharepoint-online/get-spocontentsecuritypolicy
5+
applicable: SharePoint Online
6+
title: Get-SPOContentSecurityPolicy
7+
schema: 2.0.0
8+
author: jaobrie
9+
ms.author: jaobrie
10+
manager: ryannak
11+
ms.reviewer:
12+
---
13+
14+
# Get-SPOContentSecurityPolicy
15+
16+
## SYNOPSIS
17+
18+
Returns the all entries in the current Content Security Policy configuration.
19+
20+
## SYNTAX
21+
22+
### Default
23+
24+
```powershell
25+
Get-SPOContentSecurityPolicy
26+
```
27+
28+
## DESCRIPTION
29+
30+
Returns all entries in the current Content Security Policy configuration.
31+
The url in each entry will be added to the corresponding directive during construction of the Content-Security-Policy header.
32+
33+
## RELATED LINKS
34+
35+
[Add-SPOContentSecurityPolicy](Add-SPOContentSecurityPolicy.md)
36+
37+
[Remove-SPOContentSecurityPolicy](Remove-SPOContentSecurityPolicy.md)
Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
---
2+
external help file:
3+
Module Name: Microsoft.Online.SharePoint.PowerShell
4+
online version: https://learn.microsoft.com/powershell/module/sharepoint-online/remove-spocontentsecuritypolicy
5+
applicable: SharePoint Online
6+
title: Remove-SPOContentSecurityPolicy
7+
schema: 2.0.0
8+
author: jaobrie
9+
ms.author: jaobrie
10+
manager: ryannak
11+
ms.reviewer:
12+
---
13+
14+
# Remove-SPOContentSecurityPolicy
15+
16+
## SYNOPSIS
17+
18+
Adds an entry to the Content Security Policy configuration.
19+
20+
## SYNTAX
21+
22+
### Default
23+
24+
```powershell
25+
Remove-SPOContentSecurityPolicy [-Url] <String> [-Directive] <String>
26+
```
27+
28+
## DESCRIPTION
29+
30+
Removes an entry to the Content Security Policy configuration.
31+
The url in each entry will be added to the corresponding directive during construction of the Content-Security-Policy header.
32+
Entries with a "*" directive will be applied to all directives.
33+
34+
## PARAMETERS
35+
36+
### -Url
37+
38+
Url of the Content Security Policy entry to be removed.
39+
40+
```yaml
41+
Type: String
42+
Parameter Sets: (All)
43+
Aliases:
44+
Applicable: SharePoint Online
45+
46+
Required: True
47+
Position: Named
48+
Default value: None
49+
Accept pipeline input: False
50+
Accept wildcard characters: False
51+
```
52+
53+
### -Directive
54+
55+
Directive of the Content Security Policy entry to be removed.
56+
57+
```yaml
58+
Type: String
59+
Parameter Sets: (All)
60+
Aliases:
61+
Applicable: SharePoint Online
62+
63+
Required: True
64+
Position: Named
65+
Default value: None
66+
Accept pipeline input: False
67+
Accept wildcard characters: False
68+
```
69+
70+
## RELATED LINKS
71+
72+
[Get-SPOContentSecurityPolicy](Get-SPOContentSecurityPolicy.md)
73+
74+
[Add-SPOContentSecurityPolicy](Add-SPOContentSecurityPolicy.md)

sharepoint/sharepoint-ps/sharepoint-online/Set-SPOTenant.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,7 @@ Set-SPOTenant
156156
[-CoreDefaultLinkToExistingAccess <Boolean>]
157157
[-SelfServiceSiteCreationDisabled <Boolean>]
158158
[-SyncAadB2BManagementPolicy <Boolean>]
159+
[-ContentSecurityPolicyConfigSynced <Boolean>]
159160
[<CommonParameters>]
160161
```
161162

@@ -2987,6 +2988,21 @@ Accept pipeline input: False
29872988
Accept wildcard characters: False
29882989
```
29892990

2991+
### -ContentSecurityPolicyConfigurationSynced
2992+
2993+
When set to `False` a job will be run in up to 24 hours to populate the Content Security Policy configuration with existing third-party apps in the App Catalog.
2994+
2995+
```yaml
2996+
Type: Boolean
2997+
Parameter Sets: (All)
2998+
Applicable: SharePoint Online
2999+
Required: False
3000+
Position: Named
3001+
Default value: False
3002+
Accept pipeline input: False
3003+
Accept wildcard characters: False
3004+
```
3005+
29903006
## RELATED LINKS
29913007

29923008
[Getting started with SharePoint Online Management Shell](/powershell/sharepoint/sharepoint-online/connect-sharepoint-online)

0 commit comments

Comments
 (0)