Skip to content

Commit d6f0034

Browse files
authored
Update Set-SPOTenantPreAuthSettings.md with new design
1 parent e135d60 commit d6f0034

File tree

1 file changed

+92
-33
lines changed

1 file changed

+92
-33
lines changed

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

Lines changed: 92 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ Sets the pre auth settings for the tenant.
1919

2020
**What is pre auth?**
2121

22-
SharePoint embeds self-issued tokens into some URLs called pre auth URLs or temp auth URLs to provide temporary access to a SharePoint resource, which helps support more rich user experiences. For example, a common scenario is downloading a file using a pre auth URL that includes the token in the `tempauth` query parameter like so: `https://<tenant>.sharepoint.com/sites/samplesite/_layouts/15/download.aspx?UniqueId=<id>&tempauth=v1.ey...`.
22+
SharePoint includes self-issued tokens into some URLs called pre auth URLs or temp auth URLs to provide temporary access to a SharePoint resource, which helps support more rich user experiences. For example, a common scenario is downloading a file using a pre auth URL that includes the token in the `tempauth` query parameter like so: `https://<tenant>.sharepoint.com/sites/samplesite/_layouts/15/download.aspx?UniqueId=<id>&tempauth=v1.ey...`.
2323

24-
However, pre auth is currently being deprecated. So this command lets you control whether you want to disable the use of pre auth overall and define special cases to allow or deny the use of pre auth in based on app id and feature.
24+
However, pre auth is currently being deprecated. So this command lets you control whether you want to disable the use of pre auth overall and define any special cases to allow or deny the use of pre auth in based on app id and feature.
2525

2626
## SYNTAX
2727

@@ -30,11 +30,11 @@ Set-SPOTenantPreAuthSettings -IsDisabled <bool> [<CommonParameters>]
3030
```
3131

3232
```powershell
33-
Set-SPOTenantPreAuthSettings -Add -Type {Allow | Deny} [-AppIds <string>] [-Features <string>] [<CommonParameters>]
33+
Set-SPOTenantPreAuthSettings -Add -Type {Allow | Deny} [-IncludedApps <string>] [-ExcludedApps <string>] [-IncludedFeatures <string>] [-ExcludedFeatures <string>] [<CommonParameters>]
3434
```
3535

3636
```powershell
37-
Set-SPOTenantPreAuthSettings -Remove -Type {Allow | Deny} -AppIds <string> -Features <string> [<CommonParameters>]
37+
Set-SPOTenantPreAuthSettings -Remove -Type {Allow | Deny} [-IncludedApps <string>] [-ExcludedApps <string>] [-IncludedFeatures <string>] [-ExcludedFeatures <string>] [<CommonParameters>]
3838
```
3939

4040
## DESCRIPTION
@@ -56,41 +56,41 @@ Sets the pre auth settings for the tenant.
5656
```powershell
5757
Set-SPOTenantPreAuthSettings -IsDisabled $true
5858
59-
Set-SPOTenantPreAuthSettings -Add -Type Allow -AppIds "00000000-0000-0000-0000-000000000000,11111111-1111-1111-1111-111111111111" -Features "All"
59+
Set-SPOTenantPreAuthSettings -Add -Type Allow -IncludedApps "00000000-0000-0000-0000-000000000000,11111111-1111-1111-1111-111111111111"
6060
```
61-
This example disables pre auth for the tenant overall and adds 2 apps to the allow list so that both can continue using pre auth for all features, while the rest of the apps and features are denied from using pre auth.
61+
This example disables pre auth for the tenant overall and adds a setting that allows 2 apps continue using pre auth for all features, while the rest of the apps and features are denied from using pre auth.
62+
63+
> [!NOTE]
64+
> This example relies on the default values for the `-ExcludedApps`, `-IncludedFeatures`, or `-ExcludedFeatures` parameters. So the following would be an equivalent command, where the empty quotes say that all other apps and features are included for the setting.
65+
> `Set-SPOTenantPreAuthSettings -Add -Type Allow -IncludedApps "00000000-0000-0000-0000-000000000000,11111111-1111-1111-1111-111111111111" -ExcludedApps "" -IncludedFeatures "" -ExcludedFeatures ""`
6266
6367
### Example 2
6468
```powershell
65-
Set-SPOTenantPreAuthSettings -Remove -Type Allow -AppIds "00000000-0000-0000-0000-000000000000,11111111-1111-1111-1111-111111111111" -Features "All"
69+
Set-SPOTenantPreAuthSettings -Remove -Type Allow -IncludedApps "00000000-0000-0000-0000-000000000000,11111111-1111-1111-1111-111111111111"
6670
```
6771
This example removes an existing setting from the allow list.
6872

6973
### Example 3
7074
```powershell
7175
Set-SPOTenantPreAuthSettings -IsDisabled $true
7276
73-
Set-SPOTenantPreAuthSettings -Add -Type Allow -AppIds "00000000-0000-0000-0000-000000000000" -Features "All"
74-
75-
Set-SPOTenantPreAuthSettings -Add -Type Deny -AppIds "00000000-0000-0000-0000-000000000000" -Features "Download,Embed"
77+
Set-SPOTenantPreAuthSettings -Add -Type Allow -ExcludedApps "00000000-0000-0000-0000-000000000000" -ExcludedFeatures "Download,Embed"
7678
```
77-
This example disables pre auth for the tenant overall and allows app id 00000000-0000-0000-0000-000000000000 to continue using pre auth for all features apart from the Download and Embed features.
79+
This example disables pre auth for the tenant overall and allows all apps apart from 1 to continue using pre auth for all features except for Download and Embed.
7880

79-
In this case, the app with id 00000000-0000-0000-0000-000000000000 will not be allowed to use pre auth for the Download and Embed features, but it can use pre auth for all other features. This happens because the deny list takes precedence over the allow list, so for any overlapping settings between the two lists, the deny list will win (see the first note in the description).
81+
In this case, the app with id 00000000-0000-0000-0000-000000000000 will not be allowed to use pre auth for any feature because it is not an included app for the setting. Therefore, we will default to the IsDisabled setting, which disables the use of preAuth overall. Any other app will be allowed to use pre auth for all features except for Download and Embed.
8082

8183
### Example 4
8284
```powershell
8385
Set-SPOTenantPreAuthSettings -IsDisabled $true
8486
85-
Set-SPOTenantPreAuthSettings -Add -Type Allow -AppIds "None" -Features "Download,Embed"
87+
Set-SPOTenantPreAuthSettings -Add -Type Allow -IncludedApps "00000000-0000-0000-0000-000000000000" -IncludedFeatures "WAC,Embed,Download"
8688
87-
Set-SPOTenantPreAuthSettings -Add -Type Allow -AppIds "11111111-1111-1111-1111-111111111111" -Features "All"
89+
Set-SPOTenantPreAuthSettings -Add -Type Deny -IncludedApps "00000000-0000-0000-0000-000000000000,11111111-1111-1111-1111-111111111111"
8890
```
89-
This example disables pre auth for the tenant overall, but it has overlapping settings in the allow list. The first setting says that none of the apps are allowed to use pre auth for the Download and Embed features. The second setting says that the app with id 11111111-1111-1111-1111-111111111111 is allowed to use pre auth for all features.
90-
91-
In this case, pre auth will be allowed for all features including Download and Embed for the app with id 11111111-1111-1111-1111-111111111111 even though we said that no apps can use preauth for those two features. This happens because the second allow list setting overwrites the first allow list setting (see the second note in the description).
91+
This example enables pre auth for the tenant overall, but it has overlapping settings between the allow and deny lists. The allow list setting allows the app with id 00000000-0000-0000-0000-000000000000 to use pre auth for WAC, Embed, and Download features. But the deny list setting denies the same app from using pre auth for all features.
9292

93-
If you swapped the order of the allow list settings, pre auth will no longer be allowed for the Download and Embed features for the app with id 11111111-1111-1111-1111-111111111111. But all other features should still be allowed to continue using pre auth for that app.
93+
In this case, the app with id 00000000-0000-0000-0000-000000000000 will not be allowed to use pre auth for any feature (including all the allow-listed features) because the deny list takes precedence over the allow list. Any other app will be denied from using pre auth for any feature.
9494

9595
## PARAMETERS
9696

@@ -158,22 +158,21 @@ Accept pipeline input: False
158158
Accept wildcard characters: False
159159
```
160160
161-
### -AppIds
161+
### -IncludedApps
162162
163-
String containing a comma-separated list of app ids for the allow list or deny list setting.
163+
String containing a comma-separated list of app ids that are included for the allow list or deny list setting.
164164
165165
Possible Values:
166-
- `"All"`: Default. The allow or deny list setting will apply to all apps.
167-
- A comma-separated list of app ids (e.g. `"00000000-0000-0000-0000-000000000000,11111111-1111-1111-1111-111111111111"`): The allow or deny list setting will apply to only the apps in the list.
168-
- `"None"`: The allow or deny list setting will apply to none of the apps.
166+
- `""`: Default. If both the -IncludedApps and -ExcludedApps parameters are empty strings, the allow or deny list setting will apply to all apps.
167+
- A comma-separated list of app ids (e.g. `"00000000-0000-0000-0000-000000000000,11111111-1111-1111-1111-111111111111"`): The allow or deny list setting will apply to only the apps in the list and all other apps will not have the setting applied.
169168
170169
```yaml
171170
Type: String
172171
Parameter Sets: AddListItem
173172
Applicable: SharePoint Online
174173
Required: False
175174
Position: Named
176-
Default value: "All"
175+
Default value: ""
177176
Accept pipeline input: False
178177
Accept wildcard characters: False
179178
```
@@ -182,20 +181,50 @@ Accept wildcard characters: False
182181
Type: String
183182
Parameter Sets: RemoveListItem
184183
Applicable: SharePoint Online
185-
Required: True
184+
Required: False
186185
Position: Named
187-
Default value: None
186+
Default value: ""
187+
Accept pipeline input: False
188+
Accept wildcard characters: False
189+
```
190+
191+
### -ExcludedApps
192+
193+
String containing a comma-separated list of app ids that are excluded for the allow list or deny list setting.
194+
195+
Possible Values:
196+
- `""`: Default. If both the -IncludedApps and -ExcludedApps parameters are empty strings, the allow or deny list setting will apply to all apps.
197+
- A comma-separated list of app ids (e.g. `"00000000-0000-0000-0000-000000000000,11111111-1111-1111-1111-111111111111"`): The allow or deny list setting will not apply to the apps in the list and all other apps will have the setting applied.
198+
199+
```yaml
200+
Type: String
201+
Parameter Sets: AddListItem
202+
Applicable: SharePoint Online
203+
Required: False
204+
Position: Named
205+
Default value: ""
206+
Accept pipeline input: False
207+
Accept wildcard characters: False
208+
```
209+
210+
```yaml
211+
Type: String
212+
Parameter Sets: RemoveListItem
213+
Applicable: SharePoint Online
214+
Required: False
215+
Position: Named
216+
Default value: ""
188217
Accept pipeline input: False
189218
Accept wildcard characters: False
190219
```
191220
192-
### -Features
221+
### -IncludedFeatures
193222
194-
String containing a comma-separated list of features for the allow list or deny list setting.
223+
String containing a comma-separated list of features included for the allow list or deny list setting.
195224
196225
Possible Values:
197-
- `"All"`: Default. The allow or deny list setting will apply to all features.
198-
- A comma-separated list of feature names (e.g. `"Whiteboard,Download,WAC"`): The allow or deny list setting will apply to only the features in the list (see the list below for all available features).
226+
- `""`: Default. If both the -IncludedFeatures and -ExcludedFeatures parameters are empty string, the allow or deny list setting will apply to all features.
227+
- A comma-separated list of features (e.g. `"Whiteboard,Download,WAC"`): The allow or deny list setting will apply to only the features in the list (see the list below for all available features) and all other features will not have the setting applied.
199228
200229
Features:
201230
- "Whiteboard"
@@ -239,7 +268,7 @@ Parameter Sets: AddListItem
239268
Applicable: SharePoint Online
240269
Required: False
241270
Position: Named
242-
Default value: "All"
271+
Default value: ""
243272
Accept pipeline input: False
244273
Accept wildcard characters: False
245274
```
@@ -248,9 +277,39 @@ Accept wildcard characters: False
248277
Type: String
249278
Parameter Sets: RemoveListItem
250279
Applicable: SharePoint Online
251-
Required: True
280+
Required: False
252281
Position: Named
253-
Default value: None
282+
Default value: ""
283+
Accept pipeline input: False
284+
Accept wildcard characters: False
285+
```
286+
287+
### -ExcludedFeatures
288+
289+
String containing a comma-separated list of features excluded for the allow list or deny list setting.
290+
291+
Possible Values:
292+
- `""`: Default. If both the -IncludedFeatures and -ExcludedFeatures parameters are empty string, the allow or deny list setting will apply to all features.
293+
- A comma-separated list of features (e.g. `"Whiteboard,Download,WAC"`): The allow or deny list setting will not apply to the features in the list (see the list above for all available features) and all other features will have the setting applied.
294+
295+
```yaml
296+
Type: String
297+
Parameter Sets: AddListItem
298+
Applicable: SharePoint Online
299+
Required: False
300+
Position: Named
301+
Default value: ""
302+
Accept pipeline input: False
303+
Accept wildcard characters: False
304+
```
305+
306+
```yaml
307+
Type: String
308+
Parameter Sets: RemoveListItem
309+
Applicable: SharePoint Online
310+
Required: False
311+
Position: Named
312+
Default value: ""
254313
Accept pipeline input: False
255314
Accept wildcard characters: False
256315
```

0 commit comments

Comments
 (0)