import Global from '../../_global.mdx';
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';

# spo serviceprincipal grant list

Lists permissions granted to the service principal

## Usage

```sh
m365 spo serviceprincipal grant list [options]
```

## Alias

```sh
m365 spo sp grant list
```

## Options

<Global />

## Remarks

:::info

To use this command you must be a Global administrator.

:::

## Examples

List all permissions granted to the service principal

```sh
m365 spo serviceprincipal grant list
```

## Response

<Tabs>
  <TabItem value="JSON">

  ```json
  [
    {
      "clientId": "1e551032-3e2d-4d6b-9392-9b25451313a0",
      "consentType": "AllPrincipals",
      "id": "MhBVHi0-a02TkpslRRMToFw7FM2TduxCifs3fo6XqP8",
      "principalId": null,
      "resourceId": "cd143b5c-7693-42ec-89fb-377e8e97a8ff",
      "scope": "User.Read"
    }
  ]
  ```

  </TabItem>
  <TabItem value="Text">

  ```text
  clientId                              consentType    id                                           principalId  resourceId                            scope                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      
  ------------------------------------  -------------  -------------------------------------------  -----------  ------------------------------------  ----------
  1e551032-3e2d-4d6b-9392-9b25451313a0  AllPrincipals  MhBVHi0-a02TkpslRRMToFw7FM2TduxCifs3fo6XqP8  null         cd143b5c-7693-42ec-89fb-377e8e97a8ff  User.Read
  ```

  </TabItem>
  <TabItem value="CSV">

  ```csv
  clientId,consentType,id,principalId,resourceId,scope
  1e551032-3e2d-4d6b-9392-9b25451313a0,AllPrincipals,MhBVHi0-a02TkpslRRMToFw7FM2TduxCifs3fo6XqP8,,cd143b5c-7693-42ec-89fb-377e8e97a8ff,User.Read
  ```

  </TabItem>
  <TabItem value="Markdown">

  ```md
  # spo serviceprincipal grant list 

  Date: 7/8/2025

  ## MhBVHi0-a02TkpslRRMToFw7FM2TduxCifs3fo6XqP8

  Property | Value
  ---------|-------
  clientId | 1e551032-3e2d-4d6b-9392-9b25451313a0
  consentType | AllPrincipals
  id | MhBVHi0-a02TkpslRRMToFw7FM2TduxCifs3fo6XqP8
  resourceId | cd143b5c-7693-42ec-89fb-377e8e97a8ff
  scope | User.Read
  ```

  </TabItem>
</Tabs>

