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
The Add-PnPFileSensitivityLabel cmdlet adds the sensitivity label information for a file in SharePoint using Microsoft Graph. It takes a URL as input, decodes it, and specifically encodes the '+' character if it is part of the filename. It also takes the sensitivity label Id , assignment method and justification text values as input.
28
+
29
+
## EXAMPLES
30
+
31
+
### Example 1
32
+
This example adds the sensitivity label information for the file at the specified URL.
This example adds the sensitivity label information for the file at the specified URL.
39
+
40
+
## PARAMETERS
41
+
42
+
### -Url
43
+
Specifies the URL of the file on which we add the sensitivity label information.
44
+
45
+
```yaml
46
+
Type: String
47
+
Parameter Sets: (All)
48
+
49
+
Required: True
50
+
Position: Named
51
+
Default value: None
52
+
Accept pipeline input: True
53
+
Accept wildcard characters: False
54
+
```
55
+
56
+
### -SensitivityLabelId
57
+
ID of the sensitivity label to be assigned, or empty string to remove the sensitivity label.
58
+
59
+
```yaml
60
+
Type: string
61
+
Parameter Sets: (All)
62
+
63
+
Required: True
64
+
Position: Named
65
+
Default value: None
66
+
Accept pipeline input: True
67
+
Accept wildcard characters: False
68
+
```
69
+
70
+
### -AssignmentMethod
71
+
The assignment method of the label on the document. Indicates whether the assignment of the label was done automatically, standard, or as a privileged operation (the equivalent of an administrator operation).
72
+
73
+
```yaml
74
+
Type: Guid
75
+
Parameter Sets: (All)
76
+
Accepted values: Standard, Privileged, Auto
77
+
Required: False
78
+
Position: Named
79
+
Default value: None
80
+
Accept pipeline input: True
81
+
Accept wildcard characters: False
82
+
```
83
+
84
+
### -JustificationText
85
+
Justification text for audit purposes, and is required when downgrading/removing a label.
86
+
87
+
```yaml
88
+
Type: Guid
89
+
Parameter Sets: (All)
90
+
91
+
Required: False
92
+
Position: Named
93
+
Default value: None
94
+
Accept pipeline input: True
95
+
Accept wildcard characters: False
96
+
```
97
+
98
+
## RELATED LINKS
99
+
100
+
[Microsoft 365 Patterns and Practices](https://aka.ms/m365pnp)
// Remove URL decoding from the Url as that will not work. We will encode the + character specifically, because if that is part of the filename, it needs to stay and not be decoded.
0 commit comments