How Do you "Use" an App Registration

Leonard, Jared 51 Reputation points
2022-02-23T12:47:16.003+00:00

Hello all,

I am struggling to understand how someone would or should use an App Registration. My scenario:

I have an app registration in my Azure Portal, configured as a web application. I have a Power Platform application user setup with this app registration as the application. I have a (currently unrelated) web service written in Java/JSF.

In what ways would I get this web service to "talk" to the app registration? Or, if this is the wrong way to do things, how would I edit the app registration to emulate the behavior of a web service, I.E. do XYZ thing when a URL is called?

As I understand it, the app registration is just meant to allow authentication and access to Azure data/services, and what I'm trying to get my web service to connect to is a particular Dataverse table. Please also tell me if these preconceptions are incorrect, I am not experienced with Azure/Dynamics 365/Dataverse/Power Apps/ETC.

Thanks!
Jared Leonard

Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
21,305 questions
0 comments No comments
{count} votes

Accepted answer
  1. Shweta Mathur 29,741 Reputation points Microsoft Employee
    2022-02-24T10:41:14.127+00:00

    Hi @Leonard, Jared ,
    Thanks for reaching out.

    From your query I can understand that you are looking to call Dataverse (Power platform application) from your Web Service.

    Applications which need to authenticate against Azure Active Directory need to register through Azure Portal or PowerShell and application integrate with the Microsoft identity platform follow an authorization model OAuth 2.0 that gives users and administrators control over how data can be accessed.

    To allow authenticated users to perform operations to dataverse, application need to configure with appropriate permissions to access the web-hosted resources on behalf of user.

    1.First Web Service (Java/JSF) need to register in Azure AD Tenant. You must use an account same Microsoft 365 subscription (tenant) with which you access Dynamics 365/Dataverse.

    Navigate to Azure Portal ->Application Registration ->Add

    177494-img1.png

    2.Select Manifest tab, in the manifest editor, set the allowPublicClient* property to true and click on Save.

    177477-img2.png

    3.Now configured permission under API permissions tab. Choose Dataverse under the APIs my organization uses tab.

    177436-img3.png

    4.Select User_Personation under delegated permissions and add permission to the application.

    177437-img4.png

    Now you can configure your web application with application id, tenant id and redirect URI to acquire the token and call the dataverse service using the acquired access token by passing in authorization header.

    Refrence doc: https://learn.microsoft.com/en-us/powerapps/developer/data-platform/authenticate-oauth

    Hope this will help with your query.

    Thanks,
    Shweta


    Please remember to "Accept Answer" if answer helped you.

    2 people found this answer helpful.
    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Leonard, Jared 51 Reputation points
    2022-02-24T13:15:44.393+00:00

    Hi @Shweta Mathur , thanks for your reply! That gives me a lot of threads to pull at, but I had a couple of additional questions:

    • If the application is a Web application, and I make a Web app registration, would I still need to provide a redirect URI?
    • Would you recommend a certain OAuth2 client for Java/JSF, or just constructing OAuth2 requests manually with HTTP requests?

    These extend beyond the scope of the original question though, thank you for you answer

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.