Skip to content

Commit 6f55ee2

Browse files
gnjosephgrjosephandrewconnell
authored
Update VS Code Extension tutorial documentation (SharePoint#10327)
* Update VS Code Extension tutorial documentation * Remove duplicated line * use authorize and authenticate explicitly * fix word * promote user review permissions * fix casing * request user update to latest version of vs code extension * Link to setup app registrations * Acrolinx updates * typos, grammar, markdown formatting * 🐞 fix automated build finding - no abs links --------- Co-authored-by: grjoseph <[email protected]> Co-authored-by: Andrew Connell <[email protected]>
1 parent 4b06724 commit 6f55ee2

10 files changed

+80
-14
lines changed

docs/embedded/getting-started/spembedded-for-vscode.md

Lines changed: 80 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: SharePoint Embedded for Visual Studio Code
33
description: Installation and getting started with SharePoint Embedded for Visual Studio Code
4-
ms.date: 03/03/2025
4+
ms.date: 07/16/2025
55
ms.localizationpriority: high
66
---
77

@@ -10,34 +10,40 @@ ms.localizationpriority: high
1010
The SharePoint Embedded Visual Studio Code extension helps developers get started for free with SharePoint Embedded application development.
1111

1212
> [!IMPORTANT]
13-
> To start building with SharePoint Embedded you will need administrative access to Microsoft 365 tenant.
14-
> If you do not already have a tenant, you can get your own tenant with the [Microsoft 365 Developer Program](https://developer.microsoft.com/microsoft-365/dev-program), [Microsoft Customer Digital Experience](https://cdx.transform.microsoft.com/), or create a free trial of an [Microsoft 365 E3 license](https://www.microsoft.com/microsoft-365/enterprise/microsoft365-plans-and-pricing).
13+
> To start building with SharePoint Embedded, you'll need administrative access to a Microsoft 365 tenant.
14+
> If you don't already have a tenant, you can get your own tenant with the [Microsoft 365 Developer Program](https://developer.microsoft.com/microsoft-365/dev-program), [Microsoft Customer Digital Experience](https://cdx.transform.microsoft.com/), or create a free trial of a [Microsoft 365 E3 license](https://www.microsoft.com/microsoft-365/enterprise/microsoft365-plans-and-pricing).
1515
1616
## Install SharePoint Embedded for Visual Studio Code
1717

1818
1. Open a new window in [Visual Studio Code](https://code.visualstudio.com/) and navigate to "**Extensions**" on the activity bar.
1919
1. Search "SharePoint Embedded" in the Extensions view. You can also view the extension in [Visual Studio Marketplace](https://marketplace.visualstudio.com/items?itemName=SharepointEmbedded.ms-sharepoint-embedded-vscode-extension).
2020
1. Select **"Install"** and the SharePoint Embedded icon will appear on the activity bar.
21+
1. If already installed, please update to the latest version if one is available.
2122
1. Select the icon to open the SharePoint Embedded view and create a container type with trial configuration.
2223

2324
![SharePoint Embedded VS Extensions](../images/vsx-images/n1downloadvsx.png)
2425

2526
### Sign in with admin credentials
2627

27-
To use the extension, you must sign into a Microsoft 365 tenant with an administrator account.
28-
29-
If you don't already have a tenant, you can get a tenant through the [Microsoft 365 Developer Program](https://developer.microsoft.com/microsoft-365/dev-program), [Microsoft Customer Digital Experience](https://cdx.transform.microsoft.com/), or create a free trial of an [Microsoft 365 E3 license](https://www.microsoft.com/en-us/microsoft-365/enterprise/microsoft365-plans-and-pricing).
28+
To use the extension, you must sign in to a Microsoft 365 tenant with an administrator account.
3029

3130
![Install](../images/vsx-images/n2vsx-signin.png)
3231

3332
- Authentication opens a new tab in an external browser to grant permissions
34-
- Select **Accept** on the pop-up window prompting admin consent
33+
34+
![authorize and authenticate the extension to your M365 Entra tenant](../images/vsx-images/auth-allow-extension-uri.png)
35+
36+
- Review the requested permissions carefully, then select **Accept** on the pop-up window prompting admin consent
3537

36-
![consentperms](../images/vsx-images/n3vsx-grant-admin-consent.png)
38+
![review before consenting to the permissions the extension is asking for](../images/vsx-images/n3vsx-grant-admin-consent.png)
39+
40+
After successful authorization, select open on the dialog to be redirected to VSCode:
41+
42+
![authorization completed in browser now redirecting to visual studio code](../images/vsx-images/auth-redirect.png)
3743

3844
## Create a container type with a trial configuration
3945

40-
Once signed in, you are prompted to create a [container type with trial configuration](./containertypes.md#trial-container-type). A container type lets you get started calling SharePoint Embedded APIs and building a proof-of-concept application using SharePoint Embedded. Learn more about [container types](containertypes.md).
46+
Once signed in, you're prompted to create a [container type with trial configuration](./containertypes.md#trial-container-type). A container type lets you get started calling SharePoint Embedded APIs and building a proof-of-concept application using SharePoint Embedded. Learn more about [container types](containertypes.md).
4147

4248
![home screen](../images/vsx-images/n4vsx-home-screen.png)
4349

@@ -60,20 +66,25 @@ Every container type is owned by a Microsoft Entra ID application. The first ste
6066
> [!NOTE]
6167
> 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.
6268
63-
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.
69+
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.
6470

6571
## Register your container type
6672

6773
After creating your container type, you'll need to register that container type on your local tenant. Learn more about container type [registration](./register-api-documentation.md).
6874

6975
- Follow the prompts and select **Register on local tenant** on the lower right corner of the VS Code window
76+
77+
![local tenant registration popup](../images/vsx-images/local-tenant-registration-popup.png)
78+
7079
- If you don't see the prompt, you can right-click on your `<container-type-name>` and select **Register** from the menu
7180

72-
![register](../images/vsx-images/n7aregister-ct.png)
81+
![register](../images/vsx-images/n7aregister-ct.png)
82+
83+
### Grant permissions
7384

74-
#### Grant permissions
85+
Review permissions and follow the prompt to grant admin consent
7586

76-
When registering your container type you'll need to grant permissions to access your application
87+
![grant admin consent popup](../images/vsx-images/auth-grant-admin-consent-popup.png)
7788

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

@@ -103,8 +114,63 @@ With your free trial container type created, you can use the extension to load o
103114

104115
![Load Sample App](../images/vsx-images/n15vsxsa-c.png)
105116

117+
When loading the sample application, you'll be notified that it will create plain text secrets to authenticate on your local machine.
118+
119+
![sample app plain text secrets notice](../images/vsx-images/sample-app-app-secrets-notice.png)
120+
121+
If no client secret is found on your application, it will ask if you would like to create one. Press OK to proceed.
122+
123+
![sample app creating client secret](../images/vsx-images/sample-app-create-client-secret.png)
124+
125+
> [!IMPORTANT]
126+
> This isn't intended for production environments. [Find out more on how to setup Application Registration for production environments here.](/entra/identity-platform/quickstart-register-app)
127+
128+
## Using Sample App
129+
130+
In your terminal, run the following command, this will start the sample application, which consists of 2 parts:
131+
132+
1. **React Client Application** - The frontend user interface running on port 8080
133+
1. **Azure Function Application Server** - The backend API server that handles SharePoint Embedded operations
134+
135+
```console
136+
# Navigate to your sample application directory
137+
cd [your-path]\SharePoint-Embedded-Samples\Samples\spe-typescript-react-azurefunction
138+
139+
# Install dependencies and start the application
140+
npm run start
141+
```
142+
143+
> [!NOTE]
144+
> 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.
145+
146+
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.
147+
148+
![function api console logs](../images/vsx-images/fn-api-logs.png)
149+
150+
![client app console logs](../images/vsx-images/client-app-logs.png)
151+
152+
Once both applications are running successfully:
153+
154+
1. Open your web browser and navigate to **http://localhost:8080**
155+
1. Sign in using your Microsoft 365 administrator account (the same account used in the VS Code extension)
156+
1. On the home page, select **"Containers"** to begin creating containers and uploading files
157+
1. Follow the on-screen prompts to interact with your SharePoint Embedded containers
158+
159+
![home-page-for-spe-sample-app](../images/vsx-images/spe-sample-app-home.png)
160+
161+
> [!IMPORTANT]
162+
> This sample application stores authentication secrets in plain text for development purposes only. Never use this configuration in a production environment.
163+
164+
### Troubleshooting
165+
166+
If you encounter issues:
167+
168+
- **Port already in use**: If port 8080 is already in use, the application will automatically try the next available port
169+
- **Dependencies not installing**: Try running `npm install` manually before `npm run start`
170+
- **Authentication errors**: Ensure your Microsoft Entra ID app is properly configured with the correct redirect URIs
171+
106172
## Export Postman Environment
107173

108-
The [SharePoint Embedded Postman Collection](https://github.com/microsoft/SharePoint-Embedded-Samples/tree/main/Postman) 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.
174+
The [SharePoint Embedded Postman Collection](https://github.com/microsoft/SharePoint-Embedded-Samples/tree/main/Postman) 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 Postal worker and immediately call the SharePoint Embedded APIs.
109175

110176
![Export Postman Environment](../images/vsx-images/n14postman-c.png)
Loading
Loading
Loading
Loading
19.5 KB
Loading
Loading
Loading
Loading
Loading

0 commit comments

Comments
 (0)