This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Note
Access to this page requires authorization. You can trysigning in orchanging directories.
Access to this page requires authorization. You can trychanging directories.
The SharePoint Embedded Visual Studio Code extension helps developers get started for free with SharePoint Embedded application development.
Important
To start building with SharePoint Embedded, you'll need administrative access to a Microsoft 365 tenant.If you don't already have a tenant, you can get your own tenant with theMicrosoft 365 Developer Program,Microsoft Customer Digital Experience, or create a free trial of aMicrosoft 365 E3 license.

To use the extension, you must sign in to a Microsoft 365 tenant with an administrator account.

Authentication opens a new tab in an external browser to grant permissions

Review the requested permissions carefully, then selectAccept on the pop-up window prompting admin consent

After successful authorization, select open on the dialog to be redirected to VSCode:

Once signed in, you're prompted to create acontainer type with trial configuration. A container type lets you get started calling SharePoint Embedded APIs and building a proof-of-concept application using SharePoint Embedded. Learn more aboutcontainer types.


Note
SharePoint Embedded for Visual Studio Code only supports container types with trial configuration at this time. Other container types with standard or pass-through billing configurations must be created using the SharePoint Online PowerShell Module.
Every container type is owned by a Microsoft Entra ID application. The first step when creating a free trial container type is to create a new or select an existing Microsoft Entra ID application as the owning application. You can either specify the name of your new application or pick one of your existing applications. Learn more about SharePoint Embeddedapp architecture

Note
If you choose an existing application, the extension will update that app's configuration settings for it to work with both SharePoint Embedded and this extension. Doing this is NOT recommended on production applications.
After your container type is created and your application is configured, you'll be able to view your local tenant registration as a tree in the left nav-bar.
After creating your container type, you'll need to register that container type on your local tenant. Learn more about container typeregistration.
Follow the prompts and selectRegister on local tenant on the lower right corner of the VS Code window

If you don't see the prompt, you can right-click on your<container-type-name> and selectRegister from the menu

Review permissions and follow the prompt to grant admin consent

An external browser window will pop open for you to sign-in and grant admin consent

With your container type registered, you can now create your first container. Only five containers of container type can be created to upload and manage content.


You can also recycle and recover containers within the extension.


With your free trial container type created, you can use the extension to load one of the SharePoint Embedded sample apps and automatically populate the runtime configuration file with the details of your Microsoft Entra ID app and container type.

When loading the sample application, you'll be notified that it will create plain text secrets to authenticate on your local machine.

If no client secret is found on your application, it will ask if you would like to create one. Press OK to proceed.

Important
This isn't intended for production environments.Find out more on how to setup Application Registration for production environments here.
In your terminal, run the following command, this will start the sample application, which consists of 2 parts:
# Navigate to your sample application directorycd [your-path]\SharePoint-Embedded-Samples\Samples\spe-typescript-react-azurefunction# Install dependencies and start the applicationnpm run startNote
The initial startup may take a few minutes as dependencies are installed and both applications are built. Wait for both console outputs to appear before navigating to the application.
This will install the dependencies and run the server and client application, once running, you'll see the following in the terminal, after which you can navigate to http://localhost:8080 to access the application.


Once both applications are running successfully:

Important
This sample application stores authentication secrets in plain text for development purposes only. Never use this configuration in a production environment.
If you encounter issues:
npm install manually beforenpm run startTheSharePoint Embedded Postman Collection allows you to explore and call the SharePoint Embedded APIs. The Collection requires an environment file with variables used for authentication and various identifiers. This extension automates the generation of this populated environment file so you can import it into Postman and immediately call the SharePoint Embedded APIs.
