Saturday, 15 July 2017

Hybrid connection - Web Api App for AX 2012 to Azure-part 4

This is the final post of this series.

Web Api App for AX 2012 to Azure–Intro
Deploy a Web Api App for AX 2012 to Azure–part 1
Application settings - Web Api App for AX 2012 to Azure-part 2
Authentication - Web Api App for AX 2012 to Azure-part 3
Hybrid connection - Web Api App for AX 2012 to Azure-part 4 (this one)


In this post we will set up a Hybrid Connection. This is basically a listener that sits on your on-premise server. It will expose internal port to Azure. More information on Hybrid connection on Microsoft’s site.

https://docs.microsoft.com/en-us/azure/biztalk-services/integration-hybrid-connection-overview

In your Api App, click on Networking. Then click on “Configure your hybrid connection endpoints”.

image

First download the connection manager. Install this on your on-premise server that you want to install the listener.

You don’t have to run the connection manager just yet. Set up the hybrid connection by clicking on the “Add hybrid connection”

image

Click on the “Create new hybrid connection”

image

Enter the required detail. Host is the AOS server name. The port is the net tcp port number.

image

If unsure what port to enter. Have a look at the net.tcp address in the wsdl or inside the web config file.

SNAGHTML1be4f1aa


Now lets run the Hybrid connection Manager you installed a few steps earlier. Click on “Configure another Hybrid Connection”. It will ask you to log in. Once logged in, you can seelect an existing connection. This is what you created in the portal. Click on Save and you should see a green “Connected” status next to it. The web portal should show the same.

image

That is it. Give it a test by navigating to the swagger URL. The URL is just the Api App url suffixed with swagger. eg.

https://axaptaapi1.azurewebsites.net/swagger

Authentication - Web Api App for AX 2012 to Azure-part 3

Lets set up the authentication in this post. You should always secure your application and never leave it exposed out to the web.

Click on Authentication menu and turn it on. In the drop down, select Azure Active Directory. In the Authentication providers click on Azure Active Directory to start configuring it.

image

Select the Express mode. This will create an web App registration.

image

Once authentication is configured. Lets set up a native Application registration. This step is only required if you are trying to communicate to the web service via a desktop applications, mobile application, third party tools to access your web services.

More information on application permissions and authentication on the Microsoft article.

https://docs.microsoft.com/en-au/azure/active-directory/develop/active-directory-authentication-scenarios

Navigate the the Active directory menu and click on Application permissions. You will see the “Web app/API” application registration. We will create a Native application registration.

image

When creating it you will be asked to enter a redirect URI. Enter a valid uri.

image

Click on the Native application registration and click on Required permissions. Add the Web App registration and Grant permissions (button at the top).

image

When you are adding it. You will have to search for it. It wont show up on the list automatically.

image

We are done.


Now lets test it by navigating to the swagger url. You will be asked to log in and also accept permissions.

image

There is a test service you can run to check that it has recognised you.

image

Application settings - Web Api App for AX 2012 to Azure-part 2

Last post showed how to publish your solution to Azure. This post will show you where to modify the the application settings. In visual studio you would be modifying the web config file. In the cloud you will modify the Application settings.

image

Find your Api App. Click on Application settings. Scroll down to App settings.

image

Deploy a Web Api App for AX 2012 to Azure–part 1

Continuation from previous post. In this post I will show how  publish your solution to Azure.

I assume you have followed the instruction from the GitHub wiki to download and configure.

https://github.com/ffilardi/AxaptaAPI/wiki

Now that you have done that. Lets deploy.

Create a new Api App. You might have to search for it if its not available on the menu.

image

Give it a name and select a Resource Group. Obviously pick a data centre location that is close to your AOS. If I am not sure, I like to use this site to find the closest with the lowest latency.

http://www.azurespeed.com/

image

Now you have an empty Api App. Grab the Publish file by clicking the “Get publish profiles”. This is not necessary but if you have other developers who don’t have access but you want them to publish. This one of the ways.

image

In Visual Studio right click on your project and click Publish.

image

Follow the wizard. You can sign in and select the Azure resource to deploy it to. Otherwise, use the publish file to import and publish (doesn’t require you to sign in).

image

Once its deployed. Just navigate to the swagger URL. Should look like this

https://myapiapp.azurewebsites.net/swagger

image

Web Api App for AX 2012 to Azure–Intro

Last year I did a plug for a colleague who had developed this super nice solution which you can use to expose your AIF SOAP services as RESTful services. http://dynamicsnavax.blogspot.com.au/2016/04/expose-ax-2012-aif-services-soap-as.html

Fabio has done a great job in sharing a great piece of work and also documenting it really well. What is missing is to take it to the next level.

So, in a series of posts, I will show how to deploy this to Azure via Azure Api App and communicate with your on premise AOS.

There are many benefits to this solution in the cloud

  • Integration with Azure Logic Apps – this uses swagger and Logic Apps will work really nicely
  • Expose for 3rd parties to securely integrate with your AX solution
  • No need setting up complicated IIS/Firewalls/DMZ servers etc.
  • Use Azure Authentication without a need to build anything
  • Scale easily with the cloud
  • Allows you to build mobile apps

Wednesday, 21 June 2017

Dynamics 365 for Operations Expenses Mobile App

In this post we will have a quick look at the Expenses workspace on the Dynamics 365 for Operations Mobile application.

I used a really small mobile to do my screen capture and some of the UI doesn’t look great.

First screen will give you an option to Capture a receipt (image) or go straight into the Quick expense entry form.

2017-05-29_13-39-36

Allows you to take a picture or choose from your device.

2017-05-29_13-41-30

Next screen will allow you select a category.

2017-05-29_13-42-05

Next screen is the actual form where you enter the details. Errors and warnings show at the top.

2017-05-29_13-42-522017-05-29_13-43-132017-05-29_13-45-36

It is early stages and I am sure there is more features to come.

Tuesday, 6 June 2017

What’s new Dynamics 365 for Operations mobile app

This link shows the mobile workspaces that have been released. https://docs.microsoft.com/en-us/dynamics365/operations/dev-itpro/mobile-apps/mobile-workspaces-released

However, I haven’t found the recent changes on the mobile app side. So, I decided to take a look my self.

A few new features have been added to the mobile app since the last update.

Now you can change company and sync history has been renamed to Notifications.

SNAGHTML59cbcb

Shows the list of companies. Stops if you there are unsynced changes.

SNAGHTML5a46d7

Regarding the notifications (previously sync history), it is now a lot more user friendly. You can drill through to show the record in question. Swipe to expose the delete button.

SNAGHTML5f634f

Next time I will show a bit of the expense app.