Skip to content

spo serviceprincipal grant revoke

Revokes the specified set of permissions granted to the service principal


spo serviceprincipal grant revoke [options]


spo sp grant revoke


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


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


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


Revoke permission grant with ObjectId 50NAzUm3C0K9B6p8ORLtIsQccg4rMERGvFGRtBsk2fA

spo serviceprincipal grant revoke --grantId 50NAzUm3C0K9B6p8ORLtIsQccg4rMERGvFGRtBsk2fA