|
| 1 | +--- |
| 2 | +external help file: sharepointonline.xml |
| 3 | +Module Name: Microsoft.Online.SharePoint.PowerShell |
| 4 | +online version: https://learn.microsoft.com/powershell/module/sharepoint-online/set-spoapplicationpermission |
| 5 | +applicable: SharePoint |
| 6 | +title: Set-SPOApplicationPermission |
| 7 | +schema: 2.0.0 |
| 8 | +author: cindylay |
| 9 | +ms.author: cindylay |
| 10 | +ms.reviewer: |
| 11 | +--- |
| 12 | + |
| 13 | +# Set-SPOApplicationPermission |
| 14 | + |
| 15 | +## SYNOPSIS |
| 16 | + |
| 17 | +Manages permissions for a guest application to access a SharePoint Embedded application. |
| 18 | + |
| 19 | +## SYNTAX |
| 20 | + |
| 21 | + |
| 22 | +### ParamSet1 |
| 23 | + |
| 24 | +```powershell |
| 25 | +Set-SPOApplicationPermission |
| 26 | +[[-OwningApplicationId] <OwningApplicationid>] [[-ApplicationId] <ApplicationId>] [[-PermissionAppOnly] <AppOnlyPermission>] [[-PermissionDelegated] <DelegatedPermission>] |
| 27 | +``` |
| 28 | + |
| 29 | +## DESCRIPTION |
| 30 | + |
| 31 | +The `Set-SPOApplicationPermission` cmdlet manages permissions for a guest application's access to a SharePoint Embedded application. This includes adding, updating, and deleting guest application permissions. A guest application is defined as any application within the enterprise applications of the owning tenant. |
| 32 | + |
| 33 | +You must be a SharePoint Administrator to run this cmdlet. For permissions and the most current information about Windows PowerShell for SharePoint Online, see the online documentation at [Intro to SharePoint Online Management Shell](/powershell/sharepoint/sharepoint-online/introduction-sharepoint-online-management-shell?view=sharepoint-ps). |
| 34 | + |
| 35 | +> [!NOTE] |
| 36 | +> Only app-only permissions are supported for guest applications accessing SharePoint Embedded applications. Delegated permissions are not supported and are default set to `None`. |
| 37 | +
|
| 38 | +## EXAMPLES |
| 39 | + |
| 40 | +### Example 1 |
| 41 | + |
| 42 | +```powershell |
| 43 | +Set-SPOApplicationPermission -OwningApplicationId a187e399-0c36-4b98-8f04-1edc167a0996 -ApplicationId 12345678-1234-1234-abcd-abcdefghijkl -PermissionAppOnly Read, Write |
| 44 | +``` |
| 45 | + |
| 46 | + |
| 47 | +Example 1 gives the guest application with ID `12345678-1234-1234-abcd-abcdefghijkl` app-only Read, Write permissions to access the owning application Microsoft Loop of ID `a187e399-0c36-4b98-8f04-1edc167a0996`. |
| 48 | + |
| 49 | +### Example 2 |
| 50 | + |
| 51 | +```powershell |
| 52 | +Set-SPOApplicationPermission -OwningApplicationId 5e2795e3-ce8c-4cfb-b302-35fe5cd01597 -ApplicationId 12345678-1234-1234-abcd-abcdefghijkl -PermissionAppOnly ReadContent, WriteContent -PermissionDelegated None |
| 53 | +``` |
| 54 | + |
| 55 | +Example 2 gives the guest application with ID `12345678-1234-1234-abcd-abcdefghijkl` app-only ReadContent, WriteContent permissions to access the owning application Microsoft Designer of ID `a187e399-0c36-4b98-8f04-1edc167a0996`. |
| 56 | +### Example 3 |
| 57 | + |
| 58 | +```powershell |
| 59 | +Set-SPOApplicationPermission -OwningApplicationId 5e2795e3-ce8c-4cfb-b302-35fe5cd01597 -ApplicationId 12345678-1234-1234-abcd-abcdefghijkl -PermissionAppOnly None -PermissionDelegated None |
| 60 | +``` |
| 61 | + |
| 62 | +Example 3 sets guest application permissions to None for the guest application with ID `12345678-1234-1234-abcd-abcdefghijkl`. This has deleted previous permissions for that guest application to access owning application of `a187e399-0c36-4b98-8f04-1edc167a0996`. |
| 63 | + |
| 64 | +## PARAMETERS |
| 65 | + |
| 66 | +### -OwningApplicationId |
| 67 | + |
| 68 | +Use this parameter to specify the Owning Application where guest application access is granted. |
| 69 | + |
| 70 | +```yaml |
| 71 | +Type: String |
| 72 | +Parameter Sets: (All) |
| 73 | +Aliases: |
| 74 | +Applicable: SharePoint |
| 75 | + |
| 76 | +Required: True |
| 77 | +Position: Named |
| 78 | +Default value: None |
| 79 | +Accept pipeline input: False |
| 80 | +Accept wildcard characters: False |
| 81 | +``` |
| 82 | +
|
| 83 | +### -ApplicationId |
| 84 | +
|
| 85 | +Use this parameter to specify the guest application ID. A guest application is any application within the tenant's enterprise applications. |
| 86 | +
|
| 87 | +```yaml |
| 88 | +Type: String |
| 89 | +Parameter Sets: (All) |
| 90 | +Aliases: |
| 91 | +Applicable: SharePoint |
| 92 | + |
| 93 | +Required: True |
| 94 | +Position: Named |
| 95 | +Default value: None |
| 96 | +Accept pipeline input: False |
| 97 | +Accept wildcard characters: False |
| 98 | +``` |
| 99 | +
|
| 100 | +### -PermissionAppOnly |
| 101 | +
|
| 102 | +Use this parameter to specify the app-only permissions of the guest application. |
| 103 | +
|
| 104 | +```yaml |
| 105 | +Type: String |
| 106 | +Parameter Sets: (All) |
| 107 | +Aliases: |
| 108 | +Applicable: SharePoint |
| 109 | + |
| 110 | +Required: True |
| 111 | +Position: Named |
| 112 | +Default value: None |
| 113 | +Accept pipeline input: False |
| 114 | +Accept wildcard characters: False |
| 115 | +``` |
| 116 | +
|
| 117 | +### -PermissionDelegated |
| 118 | +
|
| 119 | +This parameter specifies delegated permissions which are not supported for guest applications at this time. |
| 120 | +
|
| 121 | +```yaml |
| 122 | +Type: String |
| 123 | +Parameter Sets: (All) |
| 124 | +Aliases: |
| 125 | +Applicable: SharePoint |
| 126 | + |
| 127 | +Required: False |
| 128 | +Position: Named |
| 129 | +Default value: None |
| 130 | +Accept pipeline input: False |
| 131 | +Accept wildcard characters: False |
| 132 | +``` |
| 133 | +
|
| 134 | +
|
| 135 | +### CommonParameters |
| 136 | +
|
| 137 | +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). |
| 138 | +
|
| 139 | +
|
| 140 | +## RELATED LINKS |
| 141 | +
|
| 142 | +[Get-SPOApplication](./Get-SPOApplication.md) |
| 143 | +[Set-SPOApplication](./Set-SPOApplication.md) |
0 commit comments