Showing posts with label AZURE PORTAL. Show all posts
Showing posts with label AZURE PORTAL. Show all posts

Azure App Registration


Azure App Registration



Any application that wants to use the capabilities of Azure AD must first be registered in an Azure AD tenant. This registration process involves giving Azure AD details about your application, such as the URL where it’s located, the URL to send replies after a user is authenticated, the URI that identifies the app, and so on.

To register a new application using the Azure portal
1.       Sign in to the Azure portal.
2.       If your account gives you access to more than one, click your account in the top right corner, and set your portal session to the desired Azure AD tenant.
In the left-hand navigation pane, click the Azure Active Directory service, Click App registrations
and click New application registration.





Following are the apps I have already registered as per my requirement.


In the Azure portal, we have two types of Apps

·         Web API

Select "Web app / API" for client applications and resource/API applications that are installed on a secure server. This setting is used for OAuth confidential web clients and public user-agent-based clients. The same application can also expose both a client and resource/API.

·         Native Apps

Select "Native" for client applications that are installed locally on a device. This setting is used for OAuth public native clients.

Register your App by clicking New Application Registration Button. A popup window like below will be visible and Fill the required items and select the application type as per your requirement.


The application will visible like the below screenshot after creating the process completely.




Now click on Application for detail. Please check the below screenshot.


 Application Owner

Add only if you want to make someone an owner. Otherwise, skip the steps.

 Application Permission

Below is the permission which is required to activate.






Following are the further detail of each permission. Please check the below screenshot.








Keys


For Web API we need a secret key with the help of this key client will get the Authentication.

After generation of the key, please save the key because it will not visible again to you.




Support Faryal's Cusine


Azure Application Registration

 Azure Application Registration with permission


I was facing an issue with Azure Application authentication from OAuthHelper for the following case.

User-1 (member type) has created an application(i.e. AppB) on Azure Portal and grant the required permission(Microsoft Dynamics ERP, Windows Azure AD) and user-A can authenticate himself via OAuthHelper expected behavior [basic configuration need to set App-id, username, password in config file]

User-1 added user-2 from Azure Portal as application owner against the same application(i.e. AppB) and grant permission.

User-2 (member type) was unable to authenticate via OAuthHelper which was strange because User-1 already added him as application owner on Portal.
Exception faced: The user or administrator has not consented to use the application with ID <AppId> named AppB. 
This exception raised when calling
authenticationResult = authenticationContext.AcquireTokenAsync(aadResource, aadClientAppId, userCredential).Result;
 
I did few hit and try. Following fix work for me.

User-2 login on Azure Portal, select the same application(i.e. AppB), and press grant permission.

Now User-2 is able to authenticate via OAuthHelper no more exception

Support Faryal's Cusine


Virtual Fields Vs Computed Fields

  Virtual Field: A virtual field in D365FO is a field that doesn't have a direct representation in the database. It's a field that y...