Edit

Share via


Approve-SPOTenantServicePrincipalPermissionGrant

Approves a permission request for the current tenant's "SharePoint Online Client" service principal.

Syntax

Default (Default)

Approve-SPOTenantServicePrincipalPermissionGrant
    [-Resource] <String>
    [-Scope] <String>
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

Description

Adds a permission for the current tenant's "SharePoint Online Client" service principal. Can be used to add needed permissions to the service principal without specifically requesting them in the SharePoint Framework solution file (sppkg).

Examples

EXAMPLE 1

Approve-SPOTenantServicePrincipalPermissionGrant -Resource "Microsoft Graph" -Scope "Mail.Read"

Adds a permission scope for the 'Microsoft Graph' resource with scope claim 'Mail.Read'.

Parameters

-Confirm

Prompts you for confirmation before running the cmdlet.

Parameter properties

Type:System.Management.Automation.SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False
Aliases:cf

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Resource

Applicable: SharePoint Online

Resource of the permission request to add.

Parameter properties

Type:System.String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:1
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Scope

Applicable: SharePoint Online

Scope of the permission request to add.

Parameter properties

Type:System.String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:2
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Parameter properties

Type:System.Management.Automation.SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False
Aliases:wi

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

Inputs

None

Outputs

System.Object