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
-o, --output [output] Output type. json|text. Default text
--verbose Runs command with verbose logging
--debug Runs command with debug logging


Before using this command, log in to a SharePoint Online tenant admin site, using the spo login command.


To revoke permissions granted to the service principal, you have to first log in to a tenant admin site using the spo login command, eg. spo login

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