How to Access CDS/Dataverse Data Without A Dynamics 365 License

An individual Dynamics 365 license is required for each user who accesses a Power App which consumes CDS/Dataverse data. This article describes how to create a license free solution for CDS/Dataverse access, by using a shared application user.

  • Create app registration
  • Create application user in Dynamics 365
  • Create Microsoft Flow
  • Configure Power Apps to use the Microsoft Flow

Create app registration

  1. Go to Azure portal > App registrations.
  2. Create app registration and leave the Redirect URI as default.
  3. On the app Overview page, copy the client id, which will be used later.
  4. Select Certificates & secrets tab, click New client secret to generate a new one, and copy the secret, which will be used later.
  5. Select API permissions tab, click on Add a permission.
  6. Select Dynamics CRM under the Microsoft APIs tab.
  7. Click on Delegated permissions and check the permission user_impersonation and click on Add permissions.

Refer to this article for any questions.

Create application user in Dynamics 365

  1. Sign into Dynamics 365.
  2. Navigate to Settings > Security > Users.
  3. In the view drop-down, select Application Users.
  4. Click NEW. Then verify that you are using the Application user form. If you do not see the Application ID, Application ID URI and Azure AD Object ID fields in the form, you must select the Application User form from the list.
  5. Add the appropriate values to the fields.
FieldValue
User NameA name for the user.
Application IDThe Application ID value for the application registered previously.
Full NameThe name of your application.
Primary EmailThe email address for the user.
  1. Associate the application user with proper security role which has sufficient permission to access the CDS entities.

Refer this article for any questions.

Create Microsoft Flow

  1. Create a new Instant Flow which will be triggered in Power Apps.
  2. Configure external parameters if needed.
    1. Add a new Initialize variable action.
    2. Provide a name for this variable.
    3. Choose the proper data type.
    4. Choose the Value field.
    5. In the dynamic content panel on the right side, choose the proper parameter from the list or click Ask in PowerApps to generate new parameter for the Microsoft Flow and assign to this variable, click the See more button if the Ask in PowerApps isn’t shown in the list.
  3. Configure Dynamics 365 Web API call.
    1. Add a new HTTP action.
    2. Configure the Method and URI fields with the proper method and Dynamics 365 Web API.
    3. Configure the header Accept with the value application/json.
    4. Click the Show advanced options button.
    5. Choose the Authentication type Active Directory OAuth.
    6. Configure the expanded authentication fields with the information of the app registration created previously.
  4. Configure the response.
    1. Add a new Response action.
    2. Configure the action to output the result of previous action.
Configure HTTP action
Configure Response action

Configure PowerApps to trigger the Microsoft Flow

  1. Choose Action > Power Automate in the Power Apps ribbon menu.
  2. Choose the Microsoft Flow in the Data panel.
  3. Configure the Microsoft Flow call with proper parameters in the Run function, the parameters and order must be consistent with the Microsoft Flow.


Leave a Reply