Troubleshooting Power Automate Approval Errors: Dataverse Provisioning Solutions
This article outlines prevalent error scenarios and configuration issues that may hinder Power Automate Approvals from successfully creating and assigning approval requests. Understanding these common pitfalls is crucial for maintaining seamless approval workflows and ensuring business process continuity. These errors typically arise during the initial setup or when there are changes in the organizational configurations related to Dataverse and user licensing. Addressing these issues promptly is vital for leveraging the full potential of Power Automate Approvals within your organization.
Error with status code “ViralServicePlanRequired”¶
Failed to create the Dataverse database in this environment with status code ‘ViralServicePlanRequired’
This error message indicates a failure to provision a Dataverse database within the current environment due to a ‘ViralServicePlanRequired’ status code. This situation commonly arises in organizations where self-service sign-ups have been disabled. Self-service sign-ups are a prerequisite for assigning viral plans to users who are initiating resource provisioning and interaction with Dataverse. When this setting is disabled, users attempting to create approvals, which rely on Dataverse, will encounter this error. Fortunately, there are several options available for tenant administrators to resolve this issue and enable Dataverse provisioning for Power Automate Approvals.
Option 1: Enable AllowAdHocSubscriptions via PowerShell¶
Enabling the AllowAdHocSubscriptions setting at the tenant level is a primary solution. This setting controls whether users can sign up for viral subscriptions, which are essential for Dataverse provisioning in self-service scenarios. This can be achieved using PowerShell commands, providing a programmatic and efficient way to adjust tenant configurations.
To implement this solution, follow these steps:
-
Install the MSOnline module (if necessary): Before managing Microsoft Online services, ensure the MSOnline PowerShell module is installed on your system. This module provides the necessary cmdlets to interact with your Microsoft 365 tenant.
Install-Module MSOnline -
Connect to your organization: Establish a connection to your Microsoft 365 organization using your administrator credentials. This step authenticates your session and allows you to execute commands against your tenant.
Connect-MsolService -
Verify the current status of AllowAdHocSubscriptions: Before making any changes, it’s prudent to confirm the current setting of
AllowAdHocSubscriptions. This step ensures that you are aware of the existing configuration and can verify the change after applying the command.Get-MsolCompanyInformation | fl AllowAdHocSubscriptionsThis command retrieves company information and filters the output to display only the
AllowAdHocSubscriptionsproperty. If the output showsFalse, it confirms that self-service sign-ups are disabled, which is likely the cause of the “ViralServicePlanRequired” error. -
Enable AllowAdHocSubscriptions: Execute the following command to enable the
AllowAdHocSubscriptionssetting. This action allows users to obtain viral plans, facilitating Dataverse provisioning for Power Automate Approvals.Set-MsolCompanySettings -AllowAdHocSubscriptions $trueThis command modifies the company settings to set
AllowAdHocSubscriptionsto$true, effectively enabling self-service sign-ups. After executing this command, users should be able to provision Dataverse databases as needed for Power Automate Approvals.
Option 2: Assign a Paid Power Automate Plan¶
Another effective approach is to assign a paid Power Automate plan, such as P1 or P2, to the users who are attempting to provision approvals or a Dataverse database for the first time. This can be done through the Office 365 portal. Assigning a paid plan directly provides the necessary licensing and permissions to provision Dataverse instances, bypassing the need for viral plans in this context. This option is particularly useful when you want to grant Dataverse provisioning capabilities to specific users without enabling self-service sign-ups tenant-wide.
It is important to note that trial plans are not sufficient for Approval Dataverse provisioning. These trial plans often lack the necessary features or permissions to provision the required Dataverse infrastructure. Furthermore, for Government Community Cloud (GCC) tenants, assigning a paid plan is often the only viable option to provision database instances, as self-service sign-ups and viral plans may be restricted in these environments due to compliance and security requirements.
Option 3: Create the Database via Power Platform Admin Center¶
Administrators with environment admin privileges have the capability to directly create the Dataverse database from the Power Platform Admin Center. This method provides a manual way to provision the database, bypassing the automated provisioning triggered by Power Automate Approvals. This is particularly useful in scenarios where automated provisioning is failing due to configuration issues or when administrators prefer to have direct control over database creation.
To create the database manually:
- Navigate to the Power Platform Admin Center.
- Select the Environment where you are experiencing the error.
- Look for an option to create or manage a Dataverse database. The exact location and wording may vary slightly depending on the Admin Center updates, but generally, there will be a clear indication if a Dataverse database is not yet provisioned for the environment.
- Follow the prompts to create the database.
By manually creating the database, you pre-emptively resolve the provisioning issue and ensure that Power Automate Approvals can function correctly within the environment.
Error with status code “AADApplicationDisabled”¶
Failed to create the Dataverse database in this environment with status code ‘AADApplicationDisabled’.
Resource ‘
https://publishers.crm.dynamics.com’ has been disabled by your tenant administrator. Contact your tenant administrator and request that they enable ‘https://publishers.crm.dynamics.com’ in the Azure Portal.’.
These error messages signify that the provisioning of the Dataverse database is failing because the Dynamics CRM Online or Dataverse applications are disabled within the tenant or through Conditional Access policies for specific users. This disabling can occur intentionally as part of security hardening or unintentionally due to misconfigurations. The specific error message presented can vary depending on the current state of the Dataverse instance associated with the Power Apps or Power Automate environment. The states can range from unprovisioned, provisioned but without approvals installed, or with approvals already installed.
To resolve this “AADApplicationDisabled” error, tenant administrators must take action within the Microsoft Azure portal:
-
Access Enterprise Applications in Azure Portal: Navigate to the Microsoft Entra ID service in the Azure portal and then select Enterprise Applications. This section manages all enterprise applications registered within your Azure Active Directory tenant.
-
Locate the Dataverse/Dynamics CRM Online Application: Within Enterprise Applications, search for the application with the application ID
00000007-0000-0000-c000-000000000000. This application represents either Dataverse or Dynamics CRM Online, depending on the naming conventions within your tenant. It is essential to identify this specific application as it controls access to the Dataverse service. -
Ensure the Application is Enabled: Once you have located the application, verify that it is enabled for users to sign in. If the application is disabled, select the Properties blade and change the “Enabled for users to sign-in?” setting to Yes. Enabling this setting allows users to authenticate and access the Dataverse service through this application.
-
Review Conditional Access Policies: Examine any existing Conditional Access policies that might be in place. These policies could be blocking access to the Dataverse application for certain users or under specific conditions. Ensure that any relevant Conditional Access policies are configured to grant the necessary access to users who are expected to utilize Power Automate Approvals. You may need to modify or create exceptions in Conditional Access policies to allow access for these users.
By enabling the Dataverse/Dynamics CRM Online application and appropriately configuring Conditional Access policies, tenant administrators can restore access to the Dataverse service and resolve the “AADApplicationDisabled” error, allowing Power Automate Approvals to function correctly.
Error “Database is disabled”¶
The Dataverse database for this environment is disabled
This error message clearly indicates that the Dataverse instance associated with the current environment has been disabled. This scenario is generally not expected under normal operating conditions and is primarily linked to the expiration of all Power Automate and Dataverse plans within your Microsoft Entra tenant. When all active subscriptions for Power Automate and Dataverse expire within the tenant, the system may automatically disable Dataverse instances to reflect the lack of active licensing.
To rectify this “Database is disabled” error and re-enable the Dataverse database, ensure that at least one user within your Microsoft Entra tenant has an active Power Automate or Dataverse plan. Renewing or assigning a valid license will signal to the system that there is an active subscription associated with the tenant. Once the system detects an active plan, it typically re-enables the disabled Dataverse database, restoring functionality for Power Automate Approvals and other Dataverse-dependent services.
It is crucial to proactively manage licenses and ensure that subscriptions are renewed before expiration to avoid service disruptions and database disablings. Regularly monitoring license status and setting up renewal reminders can prevent this error from occurring.
Error “Database isn’t ready yet”¶
The Dataverse Database for this environment is not ready yet.
This message indicates that the Dataverse database for the environment is currently in a state of provisioning or has encountered a failure during the provisioning process. Database provisioning is not an instantaneous process and can take some time to complete, especially during initial setup or after significant configuration changes. Similarly, if the provisioning process encounters errors, the database may remain in a “not ready” state.
In most cases, this error is transient and resolves itself automatically once the provisioning process completes successfully. A simple and effective way to attempt to resolve this error is to re-run the Power Automate flow that utilizes approvals. Rerunning the flow triggers a check on the Dataverse database status. If the database is still in the process of provisioning or encountered a temporary failure, rerunning the flow often initiates a retry of the provisioning process. This retry mechanism can successfully complete the database setup and resolve the “Database isn’t ready yet” error.
If the error persists even after multiple attempts to rerun the flow, it may indicate a more persistent underlying issue. In such cases, it’s advisable to consult the Power Platform Admin Center for more detailed information about the environment’s status and any potential provisioning errors. Checking service health dashboards or contacting Microsoft support may also be necessary to diagnose and resolve more complex or persistent provisioning failures.
Error “User has no permission to create database”¶
The current user doesn’t have permissions to create a Dataverse database for this environment.
This error message highlights a permissions issue related to Dataverse database creation. For Power Automate and Power Apps environments that are not the default environment, a specific permission model is enforced for Dataverse database creation. In these non-default environments, only environment administrators are authorized to create Dataverse databases. This restriction is in place to maintain control and governance over database provisioning in different environments.
Environment administrators can create Dataverse databases in two ways:
-
Directly through the Power Apps Admin portal: Environment admins can explicitly navigate to the Power Apps Admin portal and initiate the creation of a Dataverse database for the specific environment. This provides a direct and controlled method for database provisioning.
-
Indirectly through Power Automate Approvals: Even when a user who is not an environment admin initiates a Power Automate flow that uses approvals, the system will attempt to provision a Dataverse database if one does not already exist for the environment. However, this indirect provisioning will only succeed if the user initiating the flow is an environment administrator. If the user lacks environment admin privileges, they will encounter the “User has no permission to create database” error.
To resolve this error, an administrator must take action:
- Grant Environment Admin Role: Assign the environment admin role to the user who needs to create the Dataverse database. This can be done through the Power Platform Admin Center. Granting environment admin rights gives the user the necessary permissions to provision the database.
Once the user has been granted environment admin privileges, they will be able to either directly create the database through the Power Apps Admin portal or indirectly trigger database creation by running a Power Automate flow that utilizes approvals.
These troubleshooting steps should help resolve common Dataverse provisioning errors encountered when using Power Automate Approvals. By understanding the causes and applying the appropriate solutions, you can ensure smooth and reliable approval workflows within your organization.
If you continue to experience issues or have further questions, please leave a comment below describing your specific scenario and error messages. Your feedback can help improve this guide and assist other users facing similar challenges.
Post a Comment