Skip to content

New command 'aad app permission list' - Get a list of app-only and delegated permissions for an App Registration #5668

@martinlingstuyl

Description

@martinlingstuyl

Related to app permission list, but not limited to app registrations in the .m365rc.json file.

Usage

m365 aad app permission list [options]

Description

Lists the application and delegated permissions for a specified AAD Application Registration

Options

Option Description
-i, --appId [appId] Client ID of the Application Registration to retrieve the permissions for. Specify appId or appObjectId but not both.
--appObjectId [appObjectId] Object ID of the Application Registration to retrieve the permissions for. Specify appId or appObjectId but not both.
--type [type] The type of permissions to retrieve. Allowed values: delegated, application, all. Defaults to all

Examples

Retrieves all permissions for an AAD app registration

m365 aad app permission list --appId 'f1417aa3-bf0b-4cc5-a845-a0b2cf11f690'

Retrieves all delegated permissions for an AAD app registration

m365 aad app permission list --appId 'f1417aa3-bf0b-4cc5-a845-a0b2cf11f690' --type delegated

Response

[
  {
    "resource": "Microsoft Graph",
    "resourceId": "00000003-0000-0000-c000-000000000000",
    "permission": "RecordsManagement.ReadWrite.All",
    "type": "Application"
  },
  {
    "resource": "Microsoft Graph",
    "resourceId": "00000003-0000-0000-c000-000000000000",
    "permission": "Sites.Read.All",
    "type": "Application"
  },
  {
    "resource": "Office 365 SharePoint Online",
    "resourceId": "00000003-0000-0ff1-ce00-000000000000",
    "permission": "AllSites.Read",
    "type": "Delegated"
  },
]

Additional information

The code of app permission list can be reused for this.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions