microsoft / Dynamics-AX-Integration

Dynamics AX Integration samples and demos.
287 stars 356 forks source link

Integration between the Dynamic Finance and Operation ERP(AX) and other endpoint: #64

Open venkateshwarlu-bavandla opened 6 years ago

venkateshwarlu-bavandla commented 6 years ago

I have created Dynmic AX trail portal using https://trials.dynamics.com/Dynamics365/Signup/operations, My trail AX portal points "https://d365try-46.trial.operations.dynamics.com/namespaces/3a628bf5-5c84-44d1-bdf6-442861a25d40/"

Now, Need do the integration between the my trail to other end point. I have created a OAuth App at Azure portal, Using that app, am able to get the Access token. But when try to access API using that accesstoken am getting 404 error. I tried two ways to get the access token. But both the ways failed to access the API

I follwoed the AX API DOC https://docs.microsoft.com/en-us/dynamics365/unified-operations/dev-itpro/data-entities/odata?toc=/fin-and-ops/toc.json

1) Access token using resource as "https://api.trial.operations.dynamics.com" { "token_type": "Bearer", "scope": "AX.FullAccess CustomService.FullAccess Odata.FullAccess", "expires_in": "3600", "ext_expires_in": "0", "expires_on": "1524457722", "not_before": "1524453822", "resource": "https://d365try-46.trial.operations.dynamics.com", "access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsIng1dCI6IkZTaW11RnJG

When i access API https://d365try-46.trial.operations.dynamics.com/data/Customers i got 404 status code

2) Access token using resource as "https://api.trial.operations.dynamics.com" { "token_type": "Bearer", "scope": "AX.FullAccess CustomService.FullAccess Odata.FullAccess", "expires_in": "3599", "ext_expires_in": "0", "expires_on": "1524220794", "not_before": "1524216894", "resource": "https://api.operations.dynamics.com", "access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsIng1dCI6Ik

When i access API https://api.operations.dynamics.com/data/Customers I could not get any response.

According to the API Doc, endpoint like "[Your organization's root URL]/data/Customers"

Here what should i use as url and also please share the AX API doc link