I am trying to integrate Microsoft Dynamics Online with my website. However, I am struggling to find a decent way to authenticate via the API (whether it'd be REST or SOAP) using PHP. Most examples use the Microsoft CRM SDK (in .NET) to authenticate. However, my website is based in PHP and I would like to know how you gain access to the Microsoft Dynamics API (REST and/or SOAP).
Does anyone know a suitable way to authenticate with the Microsoft dynamics API via php?
From Dynamics CRM 2016 onwards (v8.0) - we got REST API endpoint for cross platform integrations. It will look like this: https://crmorgname.crm.dynamics.com/api/data/v8.0/accounts
SOAP endpoints are deprecated, REST/JSON/Odata based CRM web api endpoint is the game changer. We can use XMLHttpRequest or any means to hit that endpoint with prompt VERB like PUT, GET or POST for our purpose.
To get authenticated - we have to use OAuth, for that we need to register the PHP app in Azure Active directory & enable the permissions for Dynamics CRM online. Once done we can use that Client ID & Client secret to get authenticated and the BEARER TOKEN can be used for API calls.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With