web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

connecting to dynamic crm 365 online via API

(0) ShareShare
ReportReport
Posted on by 7

Hi there,

I realize this question has been asked already in some other forms but I have some clarifications needed.

So, what we have is a Dynamic CRM online account with leads, contacts, etc. and we would like to perform CRUD operations on the CRM from a Drupal installation, we want to post some data to the CRM when a certain interaction happens on the site.

What seems to be clear from resources on the web is that the correct and more secure way is to access is via AZURE AD by requesting a token, we manage to get the token

but then we get a 401 error when we use the token to retrieve data ( using POSTMAN )

Is it the best way to use AZURE AD?

Can we use custom code ( with curl for example ) to login and access the data or do we have to use ADAL? we want to connect from a Drupal backend is it possible? is there a library for that?

stupid question: we don't have to use implicit login right? that's only if we want the user to be prompted to login right?

I use this URL login.microsoftonline.com/{{tenant}}/oauth2/v2.0/token to get the token {{tenant}} is the tenant ID ofcourse.

the request is made here https://<tenant-name>.api.crm4.dynamics.com/api/data/v9.1/leads with the authorization header : Bearer <token> 

thanx in advance 

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Guido Preite Profile Picture
    54,086 Moderator on at

    Drupal uses PHP, check if this library can help you

    https://github.com/AlexaCRM/dynamics-webapi-toolkit

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans