/
How to add SharePoint as an app in Canvas

How to add SharePoint as an app in Canvas


You must be an admin in Azure and site admin in SharePoint to make the necessary setup

Create Azure Application

Create a new application inside your Azure.

Here you will find Client Id (App Id) and Tenant Id. These are needed later, when adding SharePoint in Canvas.

Azure application overview

Add API permission

Go to API permissions and press Add a permission

Choose Application permission, select SharePoint and choose the Sites.Selected permission

Finally, grant the permission admin consent:

API permissions on Azure application

Create a client secret

Go to Certificates & Secrets

Press New client secret, enter a description and set expires to 24 months

Copy the Secret Value and save it somewhere safe in the meantime. This is also needed later.

Add application in SharePoint

This step must be done for all SharePoint sites you wish to give API access to, under you domain

Go to app invitation page

Open a new browser window and navigate to the following URL:

https://{SharePoint domain}/sites/{site}/_layouts/15/appinv.aspx

SharePoint domain is unique to your organization, for example: connectmyapps.sharepoint.com

Site is the SharePoint site you wish to give API access to.

Example of full url: https://connectmyapps.sharepoint.com/sites/Sales/_layouts/15/appinv.aspx

Add and trust the Azure application

Enter the Azure Client Id (App Id) from earlier and press Lookup.

Title should then be automatically populated.

Set App Domain to "localhost" and Redirect URL to "https://localhost".

Populate Permission Request XML with the following XML.

<AppPermissionRequests AllowAppOnlyPolicy="true"> <AppPermissionRequest Scope="http://sharepoint/content/sitecollection" Right="FullControl" /> </AppPermissionRequests>

Feel free to alter the AppPermissionRequest in the XML, for more information: https://learn.microsoft.com/en-us/sharepoint/dev/sp-add-ins/add-in-permissions-in-sharepoint

Press Create. This will redirect you to a site where you have to trust the application.

Choose Trust It

Add SharePoint as an application in Canvas

Go to the add SharePoint application page in Canvas

Enter Tenant Id, Client Id, Client Secret Value from Azure

Enter your unique SharePoint domain, for example: connectmyapps.sharepoint.com

Press Save & Authenticate

 

 

Related content

Step 1: Adding applications
Step 1: Adding applications
More like this
How to add applications in Canvas
How to add applications in Canvas
More like this
Generic REST API
More like this
Canvas platform API
Canvas platform API
More like this
Create an application registration in Microsoft Entra ID
Create an application registration in Microsoft Entra ID
More like this
Handling credentials and sensitive information
Handling credentials and sensitive information
More like this