0

I want to integrate Microsoft Dynamics 365 CRM Common Data Service using php. I want to perform CRUD of Contact entity using common data service.

Authentication I have only one option to connect with Common Data service using "ClientId or Client Secret based authentication" method. I cannot use any other authentication and authorization method.

I have followed the documentation at here but I don't find any sufficient solution.

Microsoft has given a good tutorial at here but I only have client id, client secret and url.

Is there any PHP library that I can use with client id and secret based authentication?

Saif
  • 2,873
  • 2
  • 12
  • 30

2 Answers2

0

After spending a day, I got the solution, which is AlexaCRM library. By using this library, I am able to connect to microsoft dynamics and perform curd opteration as well.

Saif
  • 2,873
  • 2
  • 12
  • 30
-1

You can find examples and libraries online, one example is this Lightweight connector library. I am not from php background, and I cannot test this myself - so you take it from here.

$RDynamics = new RDynamics(array(
    "base_url"              => "https://YOUR_CRM_INSTANCE.crm4.dynamics.com",
    "authEndPoint"          => "https://login.windows.net/common/oauth2/authorize",
    'tokenEndPoint'         => 'https://login.windows.net/common/oauth2/token',
    'crmApiEndPoint'        => 'https://YOUR_CRM_INSTANCE.api.crm4.dynamics.com/',
    "clientID"              => "***", 
    "clientSecret"          => "***", 
    'user'                  => '***',
    'pass'                  => '*'
));

Update:

Some confusion around different ways of achieving it. Read more

  • Seems you don't read the question. For authentication , I only have url, client_id and client_secret. I don't have the credentials that has been used by RDynamics. – Saif Oct 02 '20 at 16:27
  • @Saif looks like you didnt read my answer properly. Maybe my first link will answer you. Alexa is referred in multiple php questions in SO if you researched. – Arun Vinoth-Precog Tech - MVP Oct 02 '20 at 16:54
  • I already go through with your first answer before asking the question on this plateform. And what does it mean by maybe ? – Saif Oct 02 '20 at 17:20