Skip to content

Commit deaff88

Browse files
authored
Merge pull request MicrosoftDocs#849 from tseward/patch-483
Update Remove-SPAppPrincipalPermission.md
2 parents 488698a + d9803ff commit deaff88

File tree

1 file changed

+13
-10
lines changed

1 file changed

+13
-10
lines changed

sharepoint/sharepoint-ps/sharepoint-server/Remove-SPAppPrincipalPermission.md

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,12 @@ For permissions and the most current information about Windows PowerShell for Sh
2929

3030
### ---------------EXAMPLE------------
3131
```
32-
C:\PS>$appPrincipal= Get-SPApplicationPrincipal -nameIdentifier $spTrustedIssuer.nameIdentifier - web $site.rootWeb
33-
34-
C:\PS>Remove-AppPrincipalPermission -appPrincipal $appPrincipal -site $site.rootweb -scope "spweb"
32+
PS C:\>$clientID = "11111111-2222-3333-4444-555555555555"
33+
PS C:\>$site = Get-SPSite http://siteUrl
34+
PS C:\>$realm = Get-SPAuthenticationRealm -ServiceContext $site
35+
PS C:\>$appIdentifier = $clientID + "@" + $realm
36+
PS C:\>$appPrincipal = Get-SPAppPrincipal -NameIdentifier $appIdentifier -Web $site.RootWeb
37+
PS C:\>Remove-AppPrincipalPermission -AppPrincipal $appPrincipal -site $site.RootWeb -Scope Site
3538
```
3639

3740
This example removes the App Principal permission from the site collection scope.
@@ -61,9 +64,13 @@ Specifies the scope to which to apply the principal permission.
6164
The value is any of the following scopes:
6265
6366
--Farm
67+
6468
--Site collection
69+
6570
--SharePoint Online
71+
6672
--Web
73+
6774
--Documents, List, or Library
6875
6976
```yaml
@@ -96,13 +103,9 @@ Accept wildcard characters: False
96103
```
97104
98105
### -AssignmentCollection
99-
Manages objects for the purpose of proper disposal.
100-
Use of objects, such as SPWeb or SPSite, can use large amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory management.
101-
Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after they are needed to free up memory.
102-
When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects are automatically disposed of if an assignment collection or the Global parameter is not used.
106+
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects are automatically disposed of if an assignment collection or the Global parameter is not used.
103107
104-
When the Global parameter is used, all objects are contained in the global store.
105-
If objects are not immediately used, or disposed of by using the `Stop-SPAssignment` command, an out-of-memory scenario can occur.
108+
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.
106109
107110
```yaml
108111
Type: SPAssignmentCollection
@@ -152,7 +155,7 @@ Accept wildcard characters: False
152155
```
153156

154157
### -DisableAppOnlyPolicy
155-
{{Fill DisableAppOnlyPolicy Description}}
158+
Disables the app only policy.
156159

157160
```yaml
158161
Type: SwitchParameter

0 commit comments

Comments
 (0)