Consuming Dynamics AX 365FO Data entities using Web API (Part 2)

In this part of blog we will discuss, how we can create App on Azure, which is mandatory for creating this integration, if you have not gone through my last blog about setting up projects for creating this integration then please go through that

Consuming Dynamics AX 365FO Data entities using Web API (Part 1)

Now to start this:

1. We need to login to https://portal.azure.com we need Azure subscription, without Azure subscription we can not do this integration with D365FO

2. We could also create Trial subscription for demo purpose
Create an Azure trial

Once we are logged in to Azure then we will have interface like this and we will do these steps for creating Web Api App on Azure.

We need to click Azure Active Directory on Left pane, and then click App registration on center pane

Click New Application registration
Fill out App name, type (Native or WebApi) and Url that could be http://localhost. Click create to create the App.
Once app is created, click settings for giving access. Also note down the Application Id, This will be used in the Web api project we will create for consuming the data entity.

Click Add on Required permission page and add Microsoft Dynamics ERP permission and Grant it also.

Create private Key also, this is needed form Web Api apps. Please take a note of this also, this will be used as ActiveDirectoryClientAppSecret key in you web api application project.
We also need to list this application inside dynamics ax 365, In system administration module> Setup > Azure Active Directory applications. We need to place the Application id on this form

This concludes the Azure configuration part and listing of App on Azure portal, in the next blog we will see how we can consume Odata entities inside Web api project and how to make this integration happen.

Thanks

Amir 🙂 Happy Daxing.

 

 

 

 

 

Advertisements

7 Responses to Consuming Dynamics AX 365FO Data entities using Web API (Part 2)

  1. Sohaib Cheema says:

    Are you trying all of these exercises on Local VHD, which makes you put your azure subscription under setup (system administration module> Setup > Azure Active Directory applications)..?
    I don’t think if you need to put your azure application ID in setup if you are using cloud deployed box.

    • Amir Nazim says:

      For the web api application that is outside Azure VMs, you needed that setup, i believe so. I think i have tried it without putting azure subscription under setup (system administration module> Setup > Azure Active Directory applications) and i got the error.

      • Sohaib Cheema says:

        I know azure or how to create applications there. 
        I am interested to know if you are using Local Hyper-V VHD for this or your AX is in cloud..?
        I am asking this question because I cannot remember adding anything in setup for azure subscription id, back in days in 2016, when it was knows as AX7

      • Amir Nazim says:

        i am not sure, i think only browser based authentication is supported on local VHD not Azure

  2. Wajahat Mirza says:

    There is a bug in D365 ERP that you cannot consume web API from javascript or Jquery because CORS are not enabled, but you can use from C# or any other server side coding. However, you can consume D365 CRM API through client coding as well.
    There is still no solution provided by Microsoft and many people are facing the same issue.

    Below is the reference link:
    https://github.com/Microsoft/Dynamics-AX-Integration/issues/28

  3. Pingback: Consuming Dynamics AX 365FO Data entities using Web API (Part 3) | Amir's Microsoft Dynamics AX space

  4. Pingback: Payable Bot Dynamics ax 365 | Amir's Microsoft Dynamics AX space

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s

%d bloggers like this: