Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM forum
Suggested answer

Access Microsoft Graph API from Dynamics CRM Sandbox Plugin

Posted on by 10

What we want to achieve:

We need a multi-tenancy SharePoint-Integration for our CRM. We have one SharePoint-Subsite per Business Unit and multiple Business Units on our CRM instance. Therefore, it should be possible to take the right SharePoint-Site according to the Business Unit of the owner of the record to create a document library and the specified folder in the right SharePoint Subsite. This is not possible out of the box.

What we tried:

We tried to use Flows for that but we reached our request limit. Furthermore, flows are really slow and the customer wants a fast (in the best case synchronous) solution.

Current implementation:

We have a Dynamics CRM Sandbox Plugin, where I create the document locations for the SharePoint-Integration in Dynamics. For the creation of document libraries and folders in SharePoint, we use the Microsoft Graph API. However, I don't know how to authenticate to the Microsoft Graph API with our App registration and application user in Dynamics. We want to use Delegated Permissions for the App registration to reduce the privilege.

Questions:

Is it possible to use delegated permissions because the user is authenticated through Dynamics and we can use that to authenticate to Microsoft Graph API?

If yes, how is that possible? How can I authenticate through a Dynamics Plugin to Microsoft Graph API to create document libraries and folders in SharePoint.

Helpful resources

Quick Links

Replay now available! Dynamics 365 Community Call (CRM Edition)

Catch up on the first D365 Community Call held on 7/10

Community Spotlight of the Month

Kudos to Saurav Dhyani!

Congratulations to the June Top 10 community leaders!

These stars go above and beyond . . .

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 287,986 Super User

#2
Martin Dráb Profile Picture

Martin Dráb 225,588 Super User

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans