Skip to content

spo serviceprincipal grant revoke

Revokes the specified set of permissions granted to the service principal

Usage

m365 spo serviceprincipal grant revoke [options]

Alias

m365 spo sp grant revoke

Options

-i, --grantId <grantId>
ObjectId of the permission grant to revoke
-h, --help
output usage information
--query [query]
JMESPath query string. See http://jmespath.org/ for more information and examples
-o, --output [output]
Output type. json,text. Default text
--verbose
Runs command with verbose logging
--debug
Runs command with debug logging

Important

To use this command you have to have permissions to access the tenant admin site.

Remarks

The permission grant you want to revoke is denoted using its ObjectId. You can retrieve it using the spo serviceprincipal grant list command.

Examples

Revoke permission grant with ObjectId 50NAzUm3C0K9B6p8ORLtIsQccg4rMERGvFGRtBsk2fA

m365 spo serviceprincipal grant revoke --grantId 50NAzUm3C0K9B6p8ORLtIsQccg4rMERGvFGRtBsk2fA