Entra App Registration
SPFx Toolkit needs an Entra App Registration to be able to sign in to your tenant. You may either create a new one with a single click or perform the manual setup in the Azure Portal. This is required only one time on each tenant, after that you may reuse the same app registration every time you sign in.
If possible it is recommended to use the automated way to set up the SPFx Toolkit App Registration. Otherwise please follow the manual steps to perform it manually.
Automatic setup (recommended)
Section titled “Automatic setup (recommended)”- Start the sign-in process and select
Create a new App Registration - SPFx Toolkit will open a dedicated form showing the app registration that will be created for you

- Start the creation and sign in to your tenant using the web browser that just has been opened
- SPFx Toolkit will create the
SPFx Toolkitapp registration in your tenant and grant admin consent for the required permissions - Once the app registration is created you may provide a friendly name for it and SPFx Toolkit will store that in extension settings. That way when you will sign in again you may just pick it from the list of saved app registrations
- SPFx Toolkit will then sign you in to your tenant using the new app registration
In this process the following Entra App Registration will be created:
| Setting | Value |
|---|---|
| Name | SPFx Toolkit |
| Platform configurations | Mobile and desktop applications |
| Redirect URIs | http://localhosthttps://localhosthttps://login.microsoftonline.com/common/oauth2/nativeclient |
| Supported account types | Single tenant |
| Allow public client flows | Yes |
| API permissions | See Required permissions |
Manual setup
Section titled “Manual setup”If you are not able to use the automated way, for example when your organization requires a different name for the app registration, you may perform the setup manually. SPFx Toolkit will also guide you through the manual steps when you select Create a new App Registration and pick the manual option.

- Navigate to the Azure Portal
- Select Microsoft Entra ID from the global menu, select App Registrations in the Microsoft Entra ID blade and then select the New registration action button to open the Register an application form.

- In the form, enter a name for your new application. It’s recommended to name this app SPFx Toolkit but you may give it any preferable name
- Leave the
Supported account typesandRedirect URIvalues as they are and select theRegisterbutton at the foot of the form to create your custom application

- Next we need to configure the
Authenticationfor our new app. Go to theAuthenticationpage and select theAdd a platformbutton to open up theConfigure platformsmenu and under theMobile and desktop applicationsheading, selectMobile and desktop applications. This will open another menu calledConfigure Desktop + Devicesdisplaying a section calledRedirect URIsand a list of checkboxes with some pre-defined URIs.

- Select the first option in the list,
https://login.microsoftonline.com/common/oauth2/nativeclientand select theConfigurebutton at the foot of the menu.

- Under Mobile and desktop applications, click on Add URI and enter the following redirect URIs:

- We can skip over the
Supported account typesection, as this is defaulted toAccounts in this organizational directory only (tenant only - Single tenant)meaning, that only users within the current tenant directory can use this application. - In the
Advanced settingssection, we need to enable theAllow public client flowstoggle, as we are using theDevice code flowmethod to authenticate to our tenant using the CLI for Microsoft 365.

- To make sure all these changes are applied, select the
Savebutton before moving on. - Now that we have configured the application to work with the SPFx Toolkit, we next need to grant the required permissions. Select the
API permissionsin the menu option.

You will see a section called Configured permissions with one permission already granted. This is the default permission which allows the application to sign in the user account used when authenticating to the Microsoft Graph.
- Next select
Add a permissionand add all the delegated permissions listed in the Required permissions section - Select
Grant admin consent for <your tenant>and confirm. This requires an account with admin rights, check the Admin consent section for more details - Go to
Overviewpage and note down theApplication (client) IDandDirectory (tenant) ID - Click on the
Sign in to Microsoft 365, selectSign in using existing App Registrationand provide the noted downClient IdandTenant Id. Learn more in Sign in
Required permissions
Section titled “Required permissions”SPFx Toolkit requires the following delegated permissions. The same permissions are used both in the automated and the manual setup.
| API | Delegated permissions |
|---|---|
| Microsoft Graph | AppCatalog.ReadWrite.AllAuditLog.Read.AllDirectory.AccessAsUser.AllDirectory.ReadWrite.AllSecurityEvents.Read.AllServiceHealth.Read.AllServiceMessage.Read.AllSites.Read.AllUser.Read |
| Azure Active Directory Graph | Directory.AccessAsUser.All |
| Azure Service Management | user_impersonation |
| Office 365 Management APIs | ActivityFeed.ReadServiceHealth.Read |
| SharePoint | AllSites.FullControlUser.ReadWrite.All |
Although it is not recommended, it is possible to use fewer permissions than the ones required by the SPFx Toolkit, but in that case, some features may not work as expected or at all. Learn more in Technical insights.
Admin consent
Section titled “Admin consent”The required permissions need tenant-wide admin consent. That is why both the automated and the manual setup should be performed with an account that is able to create app registrations and grant admin consent, for example a Global Administrator or Privileged Role Administrator. Learn more in Grant tenant-wide admin consent to an application.