Saturday, 15 July 2017

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

1 comment:

Blogger said...

QUANTUM BINARY SIGNALS

Get professional trading signals sent to your cell phone daily.

Follow our trades right now and gain up to 270% a day.