Skip to main content

Notifications

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

  • Suggested answer
    Guido Preite Profile Picture
    54,077 Moderator on at
    RE: connecting to dynamic crm 365 online via API

    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

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Adis Hodzic – Community Spotlight

We are honored to recognize Adis Hodzic as our May 2025 Community…

Leaderboard > Microsoft Dynamics CRM (Archived)

#1
Mohamed Amine Mahmoudi Profile Picture

Mohamed Amine Mahmoudi 83 Super User 2025 Season 1

#2
Community Member Profile Picture

Community Member 54

#3
Victor Onyebuchi Profile Picture

Victor Onyebuchi 6

Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans