Microsoft Dynamics Authentication in PHP

I am trying to integrate Microsoft Dynamics Online with my site. However, I am struggling to find a decent way to authenticate through the API (be it REST or SOAP) using PHP. Most examples use the Microsoft CRM SDK (in .NET) for authentication. However, my site is based on PHP, and I would like to know how you access the Microsoft Dynamics API (REST and / or SOAP).

Does anyone know a suitable authentication method using Microsoft speaker APIs via php?

+7
source share
2 answers

The only authorization type works for Dynamics CRM Online - using the Windows Live ID. A good (and this is important - a working) example of connecting to CRM Online from PHP in the official "Dynamics CRM 2011 Developer Tutorial".

http://www.microsoft.com/en-us/download/details.aspx?id=23416

see \ CRM2011KitUpdated \ Labs \ CRMOnlinefromPHP

At least it worked for me, my library is based on this example.

0
source

Starting with Dynamics CRM 2016 (v8.0), we’ve got the REST API endpoint for cross-platform integration. It will look like this: https://crmorgname.crm.dynamics.com/api/data/v8.0/accounts

SOAP endpoints are out of date, the REST / JSON / Odata-based CRM web API endpoint is a watershed in the game. We can use XMLHttpRequest or any other means to reach this endpoint with a VERB hint, for example, PUT, GET or POST for our purpose.

To authenticate, we must use OAuth, for this we need to register the PHP application in Azure Active Directory & enable permissions for Dynamics CRM online. After that, we can use this client ID & Client Secret for authentication and BEARER TOKEN can be used for API calls.

0
source

All Articles