Skip to content

Commit c92586f

Browse files
committed
Adding SPO PowerShell cmdlet docs for Graph token config
1 parent c3aa061 commit c92586f

7 files changed

+319
-0
lines changed
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
---
2+
external help file:
3+
applicable: SharePoint Online
4+
schema: 2.0.0
5+
---
6+
# Approve-SPOTenantServicePrincipalPermissionRequest
7+
8+
> [!WARNING]
9+
> This is a preview feature and should not be used in production.
10+
11+
## SYNOPSIS
12+
Approves a permission request for the current tenant's "SharePoint Online Client" service principal
13+
14+
## SYNTAX
15+
16+
### Default
17+
```powershell
18+
Approve-SPOTenantServicePrincipalPermissionRequest -RequestId <Guid>
19+
```
20+
21+
## DESCRIPTION
22+
Approves a permission request for the current tenant's "SharePoint Online Client" service principal
23+
24+
The return value of a successful call is a permission grant object. See [the "Permission grant object" section of the
25+
Get-SPOTenantServicePrincipalPermissionGrants help documentation](Get-SPOTenantServicePrincipalPermissionGrants.md)
26+
for more information about a permission grant object.
27+
28+
To get the collection of permission grants for the "SharePoint Online Client" service principal, use the
29+
[Get-SPOTenantServicePrincipalPermissionGrants](Get-SPOTenantServicePrincipalPermissionGrants.md) command.
30+
31+
Approving a permission request also removes that request from the list of permission requests.
32+
33+
## EXAMPLES
34+
35+
### ------------------EXAMPLE 1------------------
36+
```powershell
37+
$requests = Get-SPOTenantServicePrincipalPermissionRequests
38+
$requestToApprove = $requests | ? { $_.Resource -eq 'Office 365 SharePoint Online' -and $_.Scope -eq 'MyFiles.Read' } | Select-Object -First 1
39+
40+
if ($requestToApprove -ne $null)
41+
{
42+
Approve-SPOTenantServicePrincipalPermissionRequest -RequestId $requestToApprove.Id
43+
}
44+
```
45+
46+
Approves the permission request for the 'Office 365 SharePoint Online' resource with scope claim 'MyFiles.Read'.
47+
If there is no request with those properties, then no approve action will be taken.
48+
49+
## PARAMETERS
50+
51+
### -RequestId
52+
The ID of the permission request to approve
53+
54+
```yaml
55+
Type: Guid
56+
57+
Required: True
58+
Position: Named
59+
Accept pipeline input: False
60+
```
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
---
2+
external help file:
3+
applicable: SharePoint Online
4+
schema: 2.0.0
5+
---
6+
# Deny-SPOTenantServicePrincipalPermissionRequest
7+
8+
> [!WARNING]
9+
> This is a preview feature and should not be used in production.
10+
11+
## SYNOPSIS
12+
Denies a permission request for the current tenant's "SharePoint Online Client" service principal
13+
14+
## SYNTAX
15+
16+
### Default
17+
```powershell
18+
Deny-SPOTenantServicePrincipalPermissionRequest -RequestId <Guid>
19+
```
20+
21+
## DESCRIPTION
22+
Denies a permission request for the current tenant's "SharePoint Online Client" service principal
23+
24+
Denying a permission request removes that request from the list of permission requests.
25+
26+
## EXAMPLES
27+
28+
### ------------------EXAMPLE 1------------------
29+
```powershell
30+
$requests = Get-SPOTenantServicePrincipalPermissionRequests
31+
$requestToDeny = $requests | ? { $_.Resource -eq 'Office 365 SharePoint Online' -and $_.Scope -eq 'MyFiles.Read' } | Select-Object -First 1
32+
33+
if ($requestToDeny -ne $null)
34+
{
35+
Deny-SPOTenantServicePrincipalPermissionRequest -RequestId $requestToDeny.Id
36+
}
37+
```
38+
39+
Denies the permission request for the 'Office 365 SharePoint Online' resource with scope claim 'MyFiles.Read'.
40+
If there is no request with those properties, then no deny action will be taken.
41+
42+
## PARAMETERS
43+
44+
### -RequestId
45+
The ID of the permission request to deny
46+
47+
```yaml
48+
Type: Guid
49+
50+
Required: True
51+
Position: Named
52+
Accept pipeline input: False
53+
```
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
---
2+
external help file:
3+
applicable: SharePoint Online
4+
schema: 2.0.0
5+
---
6+
# Disable-SPOTenantServicePrincipal
7+
8+
> [!WARNING]
9+
> This is a preview feature and should not be used in production.
10+
11+
## SYNOPSIS
12+
Disables the current tenant's "SharePoint Online Client" service principal.
13+
14+
## SYNTAX
15+
16+
```powershell
17+
Disable-SPOTenantServicePrincipal
18+
```
19+
20+
## DESCRIPTION
21+
Disables the current tenant's "SharePoint Online Client" service principal.
22+
23+
When the service principal's account is disabled, clients and components that use this service principal
24+
will not be able to request an access token for this service principal.
25+
26+
## EXAMPLES
27+
28+
### ------------------EXAMPLE 1------------------
29+
```powershell
30+
Disable-SPOTenantServicePrincipal
31+
```
32+
33+
Disables the current tenant's "SharePoint Online Client" service principal.
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
---
2+
external help file:
3+
applicable: SharePoint Online
4+
schema: 2.0.0
5+
---
6+
# Enable-SPOTenantServicePrincipal
7+
8+
> [!WARNING]
9+
> This is a preview feature and should not be used in production.
10+
11+
## SYNOPSIS
12+
Enables the current tenant's "SharePoint Online Client" service principal.
13+
14+
## SYNTAX
15+
16+
```powershell
17+
Enable-SPOTenantServicePrincipal
18+
```
19+
20+
## DESCRIPTION
21+
Enables the current tenant's "SharePoint Online Client" service principal.
22+
23+
## EXAMPLES
24+
25+
### ------------------EXAMPLE 1------------------
26+
```powershell
27+
Enable-SPOTenantServicePrincipal
28+
```
29+
30+
Enables the current tenant's "SharePoint Online Client" service principal.
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
---
2+
external help file:
3+
applicable: SharePoint Online
4+
schema: 2.0.0
5+
---
6+
# Get-SPOTenantServicePrincipalPermissionGrants
7+
8+
> [!WARNING]
9+
> This is a preview feature and should not be used in production.
10+
11+
## SYNOPSIS
12+
Gets the collection of permission grants for the "SharePoint Online Client" service principal
13+
14+
## SYNTAX
15+
16+
### Default
17+
```powershell
18+
Get-SPOTenantServicePrincipalPermissionGrants
19+
```
20+
21+
## DESCRIPTION
22+
Gets the collection of permission grants for the "SharePoint Online Client" service principal
23+
24+
## EXAMPLES
25+
26+
### ------------------EXAMPLE 1------------------
27+
```powershell
28+
Get-SPOTenantServicePrincipalPermissionGrants
29+
```
30+
31+
Gets the collection of permission grants for the "SharePoint Online Client" service principal.
32+
33+
## RETURNS
34+
35+
### Permission grant object
36+
37+
A permission grant contains the following properties:
38+
39+
- ClientId: The objectId of the service principal granted consent to impersonate the user when accessing the resource (represented by the resourceId).
40+
41+
- ConsentType: Whether consent was provided by the administrator on behalf of the organization or whether consent was provided by an individual. The possible values are "AllPrincipals" or "Principal".
42+
43+
- ObjectId: The unique identifier for the permission grant.
44+
45+
- _(Coming soon)_ Resource: The resource to which access has been granted.
46+
47+
- ResourceId: The objectId of the resource service principal to which access has been granted.
48+
49+
- Scope: The value of the scope claim that the resource application should expect in the OAuth 2.0 access token.
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
---
2+
external help file:
3+
applicable: SharePoint Online
4+
schema: 2.0.0
5+
---
6+
# Get-SPOTenantServicePrincipalPermissionRequests
7+
8+
> [!WARNING]
9+
> This is a preview feature and should not be used in production.
10+
11+
## SYNOPSIS
12+
Gets the collection of permission requests for the "SharePoint Online Client" service principal
13+
14+
## SYNTAX
15+
16+
### Default
17+
```powershell
18+
Get-SPOTenantServicePrincipalPermissionRequests
19+
```
20+
21+
## DESCRIPTION
22+
Gets the collection of permission requests for the "SharePoint Online Client" service principal
23+
24+
## EXAMPLES
25+
26+
### ------------------EXAMPLE 1------------------
27+
```powershell
28+
Get-SPOTenantServicePrincipalPermissionRequests
29+
```
30+
31+
Gets the collection of permission requests for the "SharePoint Online Client" service principal.
32+
33+
## RETURNS
34+
35+
### Permission request object
36+
37+
A permission request contains the following properties:
38+
39+
- Id: The identifier of the request.
40+
41+
- Resource: The resource that the application requires access to.
42+
43+
- Scope: The value of the scope claim that the resource application should expect in the OAuth 2.0 access token.
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
---
2+
external help file:
3+
applicable: SharePoint Online
4+
schema: 2.0.0
5+
---
6+
# Revoke-SPOTenantServicePrincipalPermission
7+
8+
> [!WARNING]
9+
> This is a preview feature and should not be used in production.
10+
11+
## SYNOPSIS
12+
Revokes a permission that was previously granted to the "SharePoint Online Client" service principal
13+
14+
## SYNTAX
15+
16+
### Default
17+
```powershell
18+
Revoke-SPOTenantServicePrincipalPermission -ObjectId <String>
19+
```
20+
21+
## DESCRIPTION
22+
Revokes a permission that was previously granted to the "SharePoint Online Client" service principal.
23+
24+
## EXAMPLES
25+
26+
### ------------------EXAMPLE 1------------------
27+
```powershell
28+
$grants = Get-SPOTenantServicePrincipalPermissionGrants
29+
$grantToRemove = $grants | ? { $_.Resource -eq 'Office 365 SharePoint Online' -and $_.Scope -eq 'MyFiles.Read' } | Select-Object -First 1
30+
31+
if ($grantToRemove -ne $null)
32+
{
33+
Revoke-SPOTenantServicePrincipalPermission -ObjectId $grantToRemove.ObjectId
34+
}
35+
```
36+
37+
Revokes the permission associated with the 'Office 365 SharePoint Online' resource and with scope claim 'MyFiles.Read'.
38+
If there is no permission with those properties, then no revoke action will be taken.
39+
40+
## PARAMETERS
41+
42+
### -ObjectId
43+
The Object ID of the permission grant to revoke
44+
45+
```yaml
46+
Type: string
47+
48+
Required: True
49+
Position: Named
50+
Accept pipeline input: False
51+
```

0 commit comments

Comments
 (0)