Tutorial: Register an app with Microsoft Entra ID (Microsoft Dataverse) - Power Apps (2024)

  • Article

This tutorial describes how to register an application (desktop, mobile, or Web) with Microsoft Entra ID. App registration is required before an application can authenticate with Microsoft Dataverse and access business data.

The included instructions in this article are specific to app registration in Microsoft Entra ID for Dataverse access. For expanded Microsoft Entra ID app registration information, see Application registration in Microsoft Entra ID.

About app registration and authentication

There are several authentication flows that Dataverse supports: username/password, client secret, and certificate. App registration and authentication is slightly different for each of these flows. This article covers the username/password and client secret authentication flows. Certificate flows are planned to be documented in a future article.

For an app to authenticate with Dataverse and gain access to business data, you must first register the app in Microsoft Entra ID. That app registration is then used during the authentication process.

Public and confidential clients

There are two types of clients that you can use to authenticate with Dataverse: public and confidential. These clients are represented by the PublicClientApplicationBuilder and ConfidentialClientApplicationBuilder classes. You can instance these classes in your app directly, for example if your app is using the Dataverse Web API, or you can use the ServiceClient class. The ServiceClient class handles instantiation of these clients internally based on the configuration values in the passed connection string parameters.

Note

The confidential client is used with a client secret or certificate and is often referred to as Service Principle, Application User, or server-to-server (S2S) authentication.

Prerequisites

  • A Microsoft Entra subscription for application registration. A trial account will work.

If you don't have an Azure tenant (account) or you do have one but your Microsoft 365 subscription with Dataverse isn't available in your Azure subscription, follow the instructions in the article Set up Microsoft Entra ID access for your Developer Site to associate the two accounts.

Public client app registration

To create an app registration for a username/password authentication flow, and for use with a public client or ServiceClient connection string, follow these steps.

  1. Sign in to the Microsoft Azure portal using an account with administrator permission. You must use an account in the same Microsoft 365 subscription (tenant) as you intend to register an app with. On the Home page of the portal under Azure services, select Microsoft Entra ID.

    Alternately, you can also access the Azure portal through the Microsoft 365 admin center by first choosing the All admin centers item in the left navigation pane, select Microsoft Entra, and then select Go to Microsoft Entra ID. Next, in the left navigation pane of the Microsoft Entra admin center, expand the Applications node.

  2. In the left navigation pane, select App registrations and then select + New registration on the App registrations page.

  3. On the App registrations page, enter your application's registration information as described in the table.

    Form input elementDescription
    NameEnter a meaningful application name that is displayed to users.
    Supported account typesSelect the Accounts in <any or this> organizational directory option.
  4. Select Register to create the application registration. The app registration overview page is shown. Remain on that page.

  5. On the Overview page under Essentials, select the Add a Redirect URI link. Set the redirect URI by first selecting Add a platform, enter a URI value, and then select Configure.

    You must supply a redirect URI value described as follows. For a .NET Framework built desktop or mobile app, use a URI value of "app://<Application (client) ID>". This ID value is displayed on the Overview page of the registered app. For a .NET Core built desktop or mobile app that uses MSAL for authentication, use a URI value of "http://localhost". For a Web API app, use any valid web address though the address does not have to actually exist.

  6. On the Overview page of your newly created app, hover the cursor over the Application (client) ID value, and select the copy to clipboard icon to copy the ID value. Record the value somewhere. You need to specify this value later in your application's authentication code or app.config file where appropriate.

  7. In the left navigation panel, select API permissions and then select Add a permission.

  8. Select the APIs my organization uses tab, and then in the search field, enter "Dataverse" to search for the Dataverse entry. Select the Dataverse item in the search results list.

  9. On the Request API permissions page, select Delegated permissions. Next, select (check) the user_impersonation option

  10. Select Grant admin consent for <name> even though it looks like it is already checked. Next, on the popup, select Yes to grant consent. If you do not approve consent here, your app will receive a consent error at run-time.

  11. Select Add permissions.

  12. (Optional) On the Authentication page under Advanced settings and Allow public client flows, select Yes and then Save. See the description in the next paragraphs for more information.

During authentication, if the client app does not supply a password for a username/password flow, the app user will be prompted for logon credentials in a browser window.

If you intend to supply a password for client authentication, then you must explicitly set Enable the following mobile and desktop flows to Yes. This requirement is in place to discourage providing a password in code, App.config, etc. as this method is less secure.

You've completed the public client app registration in Microsoft Entra ID.

Confidential client app registration

To create an app registration for a client secret or certificate authentication flow, and for use with a confidential client or ServiceClient connection string, follow the steps in the next two sections. You'll be creating a Microsoft Entra ID app registration and a new app user in the Power Platform admin center.

Create the app registration

App registration is much simpler for the confidential client compared to the public client. You need only provide an app registration name and set the tenant (account type) scope.

  1. Sign in to the Microsoft Azure portal using an account with administrator permission. You must use an account in the same Microsoft 365 subscription (tenant) as you intend to register an app with. On the Home page of the portal under Azure services, select Microsoft Entra ID.

    Alternately, you can also access the Azure portal through the Microsoft 365 admin center by first choosing the All admin centers item in the left navigation pane, select Microsoft Entra, and then select Go to Microsoft Entra ID. Next, in the left navigation pane of the Microsoft Entra admin center, expand the Applications node.

  2. In the left navigation pane, select App registrations and then select + New registration on the App registrations page.

  3. On the App registrations page, enter your application's registration information as described in the table.

    Form input elementDescription
    NameEnter a meaningful application name that is displayed to users.
    Supported account typesSelect the Accounts in <any or this> organizational directory option.
  4. Select Register to create the application registration. The app registration overview page is shown.

  5. Add a client secret by selecting the Certificates & secrets link in the left navigation pane. More information: Add a client secret

Important

After adding a client secret, save a copy of the secret value for later use. Do not navigate away from the client secret page until after you have copied the secret value (not the ID) as you'll not have access to the secret value again.

Create a new app user

Follow these steps to create an app user and bind it to your app registration.

  1. Log into the Power Platform admin center using an account in the same tenant as your app registration.

  2. Select Environments in the left navigation pane, and then select the target environment in the list to display the environment information.

  3. Select the S2S link on the right side of the page.

  4. Select New app user.

  5. On the Create a new app user slide-out, select + Add app.

  6. Start typing the name of your app registration in the search field, and then select (check) it within the results list. Next, select Add.

  7. Back on the Create a new app user slide-out, select the target Business unit from the drop-down and add a security role for the app user (also known as a service principle).

  8. Select Save and then Create. You should see your new application user in the displayed list of application users.

Use an app registration in code

To view code that uses an app registration, see the Get Started SDK samples, and the QuickStart Web API sample.

The sample code contains example public and confidential client connection strings for use with the ServiceClient class.

See also

Authenticate Users with Dataverse Web Services

Tutorial: Register an app with Microsoft Entra ID (Microsoft Dataverse) - Power Apps (2024)

FAQs

What is the difference between Microsoft Entra registered and joined? ›

Generally registered devices would be users personal devices, mobile phones or laptops etc.. they log into the device with their personal credentials. An Entra ID joined device is connected to your organization, and users can log into the devices with their work account.

What is the difference between enterprise application and app registration? ›

Reference: https://learn.microsoft.com/en-us/training/modules/plan-design-integration-of-enterprise-apps-for-sso/7-configure-pre-integrated-gallery-saas-apps. App Registrations is where you register your applications, while Enterprise Applications is where you manage access to these applications.

How to register Microsoft apps? ›

In the Microsoft Entra admin center, in App registrations, select your application. Under Manage, select Authentication. Under Platform configurations, select Add a platform. Under Configure platforms, select the tile for your application type (platform) to configure its settings.

Which object type is automatically created when you register an application in Microsoft Entra ID? ›

When you register an application, a service principal is created automatically. You can also create service principal objects in a tenant using Azure PowerShell, Azure CLI, Microsoft Graph, and other tools.

How to register device with Entra ID? ›

You can initiate device registration via the Settings app. Simply go to Settings -> Accounts -> Access work or school. Then select Connect from the Access work or school screen. You can also go through the device registration process by signing into a Microsoft application with your University credentials.

How does Microsoft Entra ID work? ›

App developers can use Microsoft Entra ID as a standards-based authentication provider that helps them add single sign-on (SSO) to apps that works with a user's existing credentials. Developers can also use Microsoft Entra APIs to build personalized experiences using organizational data.

How to register an app in Microsoft Entra? ›

Sign in to the Microsoft Entra admin center as at least an Application Developer. If you have access to multiple tenants, use the Settings icon in the top menu to switch to your external tenant from the Directories + subscriptions menu. Browse to Identity >Applications > App registrations. Select + New registration.

What resource is automatically created in Microsoft Entra ID when you assign the identity? ›

When you assign an identity in Microsoft Entra ID, an Azure AD (Active Directory) user account is automatically created. This Azure AD user account serves as the resource that is automatically generated in Microsoft Entra ID.

What is an app registration in Microsoft? ›

The Microsoft identity platform app registration portal is the primary entry point for applications that use the platform for authentication and associated needs. As a developer, when registering and configuring your apps, the choices you make drive and affect how well your application satisfies Zero Trust principles.

Can users register applications in entra id? ›

By default in Microsoft Entra ID, all users can register applications and manage all aspects of applications they create. This can be restricted to only allow selected people that permission. Assigning one or more owners to an application.

What is a Microsoft Entra application? ›

The Microsoft Entra application gallery is a collection of software as a service (SaaS) applications that are preintegrated with Microsoft Entra ID. The collection contains thousands of applications that make it easy to deploy and configure single sign-on (SSO) and automated user provisioning.

What is the difference between application ID and service principal ID? ›

You can think of Application object as a globally unique template/blueprint/definition that represents an application whereas the Application service principal object is a concrete representation of the application for purposes of consent being given to it, permissions to access resources being granted to it, etc., in ...

What is a benefit from using Microsoft Entra Hybrid Join? ›

Microsoft Entra joined devices help to simplify many different types of challenges in the hybrid enterprise environment. It helps ease Windows deployments, including for work-owned devices and allows access to apps and resources from any Windows device.

What is joined or registered in Azure AD? ›

These devices are first joined to an on-premises AD domain controller (AD Joined), and then a registered with Azure AD to extend the identity into Azure AD. Users can log in using either their on-premises AD credentials or their Azure AD credentials, depending on the configuration.

What is the new name for Microsoft Entra? ›

Microsoft Entra ID is the new name for Azure AD. The names Azure Active Directory, Azure AD, and AAD are replaced with Microsoft Entra ID. Microsoft Entra is the name for the product family of identity and network access solutions.

How to entra join a registered device? ›

The most common way Microsoft Entra joined devices register is during the out-of-box-experience (OOBE) where it loads the Microsoft Entra join web application in the Cloud Experience Host (CXH) application.

Top Articles
Inflation is impacting insurance rates: here's why | Liberty Mutual
The Root Causes of Health Inequity
Katie Pavlich Bikini Photos
Gamevault Agent
Hocus Pocus Showtimes Near Harkins Theatres Yuma Palms 14
Free Atm For Emerald Card Near Me
Craigslist Mexico Cancun
Hendersonville (Tennessee) – Travel guide at Wikivoyage
Doby's Funeral Home Obituaries
Vardis Olive Garden (Georgioupolis, Kreta) ✈️ inkl. Flug buchen
Select Truck Greensboro
How To Cut Eelgrass Grounded
Pac Man Deviantart
Alexander Funeral Home Gallatin Obituaries
Craigslist In Flagstaff
Shasta County Most Wanted 2022
Energy Healing Conference Utah
Testberichte zu E-Bikes & Fahrrädern von PROPHETE.
Aaa Saugus Ma Appointment
Geometry Review Quiz 5 Answer Key
Walgreens Alma School And Dynamite
Bible Gateway passage: Revelation 3 - New Living Translation
Yisd Home Access Center
Home
Shadbase Get Out Of Jail
Gina Wilson Angle Addition Postulate
Celina Powell Lil Meech Video: A Controversial Encounter Shakes Social Media - Video Reddit Trend
Walmart Pharmacy Near Me Open
Dmv In Anoka
A Christmas Horse - Alison Senxation
Ou Football Brainiacs
Access a Shared Resource | Computing for Arts + Sciences
Pixel Combat Unblocked
Umn Biology
Cvs Sport Physicals
Mercedes W204 Belt Diagram
Rogold Extension
'Conan Exiles' 3.0 Guide: How To Unlock Spells And Sorcery
Teenbeautyfitness
Weekly Math Review Q4 3
Facebook Marketplace Marrero La
Nobodyhome.tv Reddit
Topos De Bolos Engraçados
Gregory (Five Nights at Freddy's)
Grand Valley State University Library Hours
Holzer Athena Portal
Hampton In And Suites Near Me
Stoughton Commuter Rail Schedule
Bedbathandbeyond Flemington Nj
Free Carnival-themed Google Slides & PowerPoint templates
Otter Bustr
Selly Medaline
Latest Posts
Article information

Author: Laurine Ryan

Last Updated:

Views: 6049

Rating: 4.7 / 5 (57 voted)

Reviews: 80% of readers found this page helpful

Author information

Name: Laurine Ryan

Birthday: 1994-12-23

Address: Suite 751 871 Lissette Throughway, West Kittie, NH 41603

Phone: +2366831109631

Job: Sales Producer

Hobby: Creative writing, Motor sports, Do it yourself, Skateboarding, Coffee roasting, Calligraphy, Stand-up comedy

Introduction: My name is Laurine Ryan, I am a adorable, fair, graceful, spotless, gorgeous, homely, cooperative person who loves writing and wants to share my knowledge and understanding with you.