Skip to content

Grant API permissions from an SPFx project #4347

@waldekmastykarz

Description

@waldekmastykarz

Usage

m365 spfx project permissions grant

Description

Grant API permissions defined in the current SPFx project

Options

None

Examples

Grant API permissions requested in the current SPFx project

m365 spfx project permissions grant

Default properties

No response

Additional Info

When debugging SPFx projects that need API permissions, the inner loop fails which leads to a poor developer experience. Because you only serve the project locally and you’re not building and deploying a package, the necessary permissions are never requested and the app breaks. You need to either manually add the necessary permissions using CLI or build and deploy a package and grant the requested permissions before you can continue developing. Instead, we can offer a command that retrieves permissions requests from the current project and uses the spo sp grant add command to add each permission grant simplifying the dev ex.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions