Tuesday, 23 May 2017

Dynamics 365 for Operation Web Service calls with POSTMAN

In this post I will explain using POSTMAN but it really doesn’t matter what tool you use (SOAPUI is another common tool). The main point I am trying to make is how to put the authentication piece together so you can start messaging to/from the web service.

Download POSTMAN from their site https://www.getpostman.com/

In Azure AD register the application. For more info see previous post I wrote http://dynamicsnavax.blogspot.com.au/2016/09/azure-ad-in-new-portal.html

For POSTMAN, you need to enter the redirect. POSTMAN would tell you this later when you try to get a token.

Redirect URL: https://www.getpostman.com/oauth2/callback

image

Open up POSTMAN and enter your URL you want to send a request to. Click on the bright orange button “Get New Access Token”

image

This dialog will pop up. It will ask for a bit of info:

  1. Auth URL – You can enter the following. Replace the tenant and the resource url https://login.windows.net/mytenant.onmicrosoft.com/oauth2/authorize?resource=https%3A%2F%notarealurl1adaos.cloudax.dynamics.com
  2. Access Token URL – same thing replace the tenant and the resource url – https://login.windows.net/mytenant.onmicrosoft.com/oauth2/token?resource=https%3A%2F%notarealurl1adaos.cloudax.dynamics.com
  3. Client ID – Get the Application ID from Azure 2 screenshots above. Mine starts with b87bf*****

image

When you click on the request, it will pop up with the login window. If you supply a Client Secret key it won’t.

You should get a response and then you can click on “Use Token” button. It will insert it into the header of the message.

image

You can now enter your parameters if you wish. Nice interface to play with. It will build up your URL for you. Then click on Send button.

Result should show in the body.

image

Friday, 28 April 2017

Troubleshooting web service authentication Dynamics 365 for Operations

In this post I just wanted to highlight the event viewer logs on a developer box. Make good use of it – not just for web services but for most errors.

Below is a recently problem I was troubleshooting.

I was working on the Microsoft github integration project to do a proof of concept using odata. I had problems with the authentication. I was able to retrieve the token from Azure AD however the odata authentication piece failed with D365O.

I got this error “Microsoft.OData.Client.DataServiceClientException: Unauthorized” 

image

In debug I got down to this “Unknown user type” error.

image

So, after looking at the event viewer. Expand Applications and Service Logs > Microsoft > Dynamics > AX-IntegrationCommon > Operational

image

image

From the error I found that the tenant which is blurred was different. I had 2 Azure subscription.

All I had to do what runt he Admin Provisioning tool against the tenant I wanted to do the integration with. Then all worked fine.

Another way I could have done this troubleshooting is by using Fiddler. Maybe in the next blog.

Reference:

Wednesday, 29 March 2017

Dynamics 365 for Operations Security Analysis

I was recently looking at different ways of analyzing the security in the AOT. I found an Addin that is in Visual Studio.

Click on the “View related objects and licenses for all roles”.

image

It takes about 5 minutes to put all the data together and export an Excel file.

You get two worksheets.

  • License information – Shows the different security objects; Roles, Duties and Privileges. Showing the license type.
  • View related objects – This is a detailed exploded view of the Roles, duties, privileges, resource (I.e. menu item)

image

image

Based on the second tab I was able to create a pivot table. This allows me to figure out what makes a particular license Enterprise.

image

The thing you have to keep in mind is that this is looking at the AOT. If you have made security changes in the front end, this Addin won’t recognize it.

If you want to review security from the front end then navigation to the Security configuration form. Then click on the View permissions.

image

You will get a similar list as the Excel sheet. You get the Role license type. In the grid you get the exploded view with the license type. You can sort on the License column and figure out what makes up the Enterprise license.

image

I have a few suggestions for Microsoft:

1. Can we have a simple export from the front end. Export the same Excel as the add in – I.e. exploded view for all security objects.

2. Add a new Excel worksheet to export the “User roles” - Users with their roles and showing the License type. Also add the field Enabled (active user or not).

3. Make these exploded view an actual table that gets updated periodically.

4. Create data entities for PowerBI content pack. This would allow the ERP administrators a dashboard to see things like

     a) Number of Active users by License type

     b) Drill through to Roles and Security objects

Saturday, 11 March 2017

SSIS support for AX OData connection

With prior versions of SSIS, the you couldn’t save online authentication with OData connections. If you wanted to use it, you had to wrap the messages using c# code. Now with the latest SQL 2016 update there was a nice feature that sneaked under the radar.

The OData Connection Manager now supports five modes of authentication.

  • Windows Authentication

  • Basic Authentication (with username and password)

  • Microsoft Dynamics AX Online (with username and password)

  • Microsoft Dynamics CRM Online (with username and password)

  • Microsoft Online Services (with username and password)

Read more here on msdn https://msdn.microsoft.com/library/dn584133.aspx

This is what the interface looks like.

image

It will pop up with the sign in and will save it.

image

This is a very exciting release.

Friday, 3 February 2017

PowerApp with Dynamics 365 for Operations #D365O

Recently, I spent I bit of time on PowerApps. Below is a walk through of my findings.

Go to https://powerapps.microsoft.com and log in. This will take you through to the PowerApps dashboard. Here you can define your connection. This step requires that you authenticate to your D365O. Based on your email it will list all the D365O you have on your tenant.

image

You can then create a new Application now. Click on Get started under the Create an app menu.

image

First thing it comes up with is the connection. Select D365O and the Odata services will be listed. I chose to select the InventorySitesOnHand.

image

Wizard will default 3 pages.

  • List
  • Details
  • Edit

You can change the layout and the fields easily. Just click on the page to change the layout. Click on the field to select or change the field.

image

You can save your application.

image

If you run it, it will give you a preview.

image

Download the App on your mobile

Now this below is from my personal android phone. PowerApps will list all the apps you have published.

SNAGHTMLb57a6b7

This is the final result

SNAGHTMLb58bba2

I haven’t done formatting but this is how the details page looks like.

SNAGHTMLb5ab1b5

It is an online app. If you go offline and try to access the app. Then you will get an error.

SNAGHTMLb67e49d

Lastly, you can pin the app that was published.

SNAGHTML651cd1a

When you pin it, it will go on your home screen.

SNAGHTML652af7b

There are a couple of posts which I found to be useful

https://dynamics3654operations.wordpress.com/2016/11/13/powerapps-for-dynamics-365-for-operations-part-1/

https://dynamics3654operations.wordpress.com/2016/11/24/inventoryonhand-a-first-powerapp-for-dynamics-365-for-operations-part-2/

Friday, 27 January 2017

Workflow configurable hierarchy #D365O

This was a nice find in the latest version of D365O. In workflow we can associate a hierarchy to a configuration. In pervious versions we where only allowed to select the one primary managerial hierarchy.

image

A slider will pop up which you can select a hierarchy.

image

In the assignments in AX 2012 we where only allowed to select the Managerial hierarchy.

image

In D365O we can select Configurable hierarchy.

image

Thursday, 19 January 2017

Inventory on-hand mobile workspace for Microsoft Dynamics 365 for Operations app

Over the last couple of months I posted about the Dynamics 365 for Operations mobile platform.

Part 1 – Logging in

Part 2 – Basic configuration

Part 3 – Advanced configuration

Part 4 – Export/Import

I intentionally say platform and not app. This is because it is somewhat a generic in nature. You can record a series of forms and actions to use as an app. The App behaves similar to the full browser application by focusing on workspace concept. You click on a workspace and drill through to menu items.

Search for a KB 3215650 that will allow you to deploy 4 recorded apps done by Microsoft. This hotfix includes the workspaces for Supply Chain Management listed below. More information on the wiki links below.

Focusing on the Inventory on-hand workspace. Below are some screenshots.

You get 4 workspaces that Microsoft provided. Drill into the Inventory workspace and you get one option

SNAGHTMLc74505fSNAGHTMLc74d2af

  You get the item list to search. The when you drill through you have basic information with some links. Notice the different action available to see availability on.

SNAGHTMLc764876SNAGHTMLc769b1a

I had some labels missing here. Next time I will try to dive in deeper to find out more.

SNAGHTMLc780fc9