Set Up Integration

Refer to the below Microsoft URL as a reference –

https://learn.microsoft.com/en-us/sharepoint/dev/solution-guidance/security-apponly-azureacs

 

1.   Engineer creates 2 new sites on SharePoint, one for Production, the other for Sandbox.

2.   Enable SharePoint access to Zavanti user.

3.   Provide SharePoint URL to Zavanti so that integration with D365 can be set up by Zavanti.

4.   Register Sharepoint Add-in using appRegNew Form

5.   Navigate to – the site collection URL set up in step 1.

[Site Collection URL]/_layouts/15/AppRegNew.aspx

 

6.   Click Generate Client ID and for Client Secret. Insert appropriate Title, App Domain and Redirect URL

 

 

7.   Click Create to proceed with the Sharepoint App Add-in creation process.

8.   Please provide Zavanti the Client ID and Client Secret set up in step 5. We need this to authenticate SharePoint integration from Dynamics.

9.   Next step is granting permissions to the newly created principal. Since we're granting tenant scoped permissions this granting can only be done via the appinv.aspx page on the tenant administration site. You can reach this site via https://<<sharepoint site collection URL>>/_layouts/15/appinv.aspx

10. Once the page is loaded add your client id (created in step 5) and click on look up the created principal.

 

 

To grant permissions, you'll need to provide the permission XML that describes the needed permissions. Since this application needs to be able to access to the Zavanti SharePoint site (created in step 1)

XMLCopy

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

When you click on Create, you'll be presented with a permission consent dialog. Press Trust It to grant the permissions:

 

In order to confirm the permission has been granted to the add-in.Navigate to [Site Collection URL]/_layouts/15/appprincipals.aspx