Managed Environments (preview) – Power Platform Admin Center


Managed Environments is a new feature added in the Power Platform Admin Center to simplify the administration of the platform. It is in Preview currently.

To enable it, select a particular environment and click on Enable Managed Environments.

We will need either Global Admin, Power Platform Administrator, or Dynamics 365 Administrator AD roles to enable the Managed Environments.

Through Managed Environment, we can specify who can receive the Weekly
Digest i.e., a weekly email summary of resource usage in the environment, apart from Dynamics 365 and Power Platform Admin. (it can be managed through PowerShell also)

Limit the sharing of the canvas apps to the security group and max number of users.

New Environment filters for the Managed Environment with regards to data policies.

 

For the Weekly Digest, we need to enable the tenant-level analytics from Power Platform Admin Center, click on the settings gear, and enable it from the Power Platform settings window.

Below are the information provided in the Weekly Digest

Total Apps, active flows and active app users in the past month in the managed environments.

Details of the apps that haven’t been launched for a long time.

Details of the most popular apps and flows of the last month.

Through Limit Sharing we can configure sharing with security groups as well as the max number of users with whom the app can be shared with. Here just for testing, we have set it as 1.

On trying to share the canvas apps with more than one user we will get the below error

“Apps in this environment cannot be shared with security groups or more than 1 user.”

The Data policies option adds the additional filter on the Data Policies page to show the details for the selected environment.

Click on the See active data policies for this environment

Below we can see the Environment filter added.

Get all the details here

Below is the mail we received for one of our trial tenant, which had hardly anything in it.

Analytics

Hope it helps..

Advertisements

Fixed – Unable to add record type ‘Lead’. It is invalid to create component msdyn_decisioncontract with the same export value as an existing component in Unified Routing (Dynamics 365)


Recently while trying to enable Unified Routing on Lead table/ entity we got the below error.

“Unable to add record type ‘Lead’. It is invalid to create component msdyn_decisioncontract with the same export value as an existing component

The issue was that the we forgot to enable the unified routing on lead before migrating lead related unified routing records in that environment, from the development environment.

So as per the details in the error message, we found the below record and deleted it.

After deletion it allowed us to enabled the Unified routing on Lead as shown below.

Hope it helps..

Advertisements

How to – Force User Sync– Power Platform / Dynamics 365


Suppose you have added a user in Microsoft 365 Admin Center and assigned the required license to access Dynamics 365 Apps / added to the appropriate security group (if used) of the environment also.

You log in to CRM and the user still doesn’t appear there.

We see the sample user and not the sample user test we added.

We have multiple options to force the user sync here.

Ask the user to access the CRM – https://nishantrana.me/2021/12/14/the-trick-to-force-trigger-user-sync-power-platform-dynamics-365/

Use Power Automate Force Sync User action or PowerShell cmdlets

https://nishantrana.me/2021/12/13/using-force-sync-user-to-sync-powerapp-crm-users-power-platform-dynamics-365/

or the quickest is to log in to Power Platform Admin Center

Select the Users (see all) option for the Environment

Click on Add User and search for the user and add

Here we have searched and added the Sample User Test we added earlier in Microsoft 365 Admin Center

We will get the notification that the user has been added, on refresh we can see the user added.

Back inside CRM also we can see the user.

Thanks to my friend Sharif  (CRM Architect) for the tip.

Hope it helps..

Advertisements

Fixed – Resource not found for the segment in Power Automate


You might get this error while writing a flow –

Fixed – Resource not found for the segment – ‘GUID’

The error was for the below field – Owner (lookup)

To populate a lookup field, we need to specify the plural schema name of the entity /table, followed by the GUID –

Both the option worked –

Hope it helps..

Advertisements

Run as option in When a row is added, modified or deleted trigger – Power Automate


Let us see Run As option of When a row is added, modified or deleted trigger in action, to understand its behavior.

Below is our example flow – it triggers when a field on the case is updated and then it updates the lead record.

Here we have not specified any value for Run as for When a row is added, modified or deleted trigger step.

On updating a case record using the User 1 account who is also the Flow Owner, we can see the modified user as User 1 for the lead record.

Let us trigger the flow this time through User 2.

This time also modified by for the lead record is User 1, even though the Modifying User and Row Owner were different.

So if Runs as is not specified, the Microsoft Dataverse actions are performed using the context of the Flow Owner.

To test it further let us remove the update rights of User 1, who is the flow owner, and trigger the flow again using User 2.

As expected the flow run fails this time.

Principal with id 7252e222-c07f-ec11-8d22-000d3a98d479 does not have WriteAccess right(s) for record with id 8ce6c6de-1bff-e411-80d4-c4346bac4730 of entity lead

Not let us specify Run as = Modifying User this time, and trigger the flow using User 2 again. (we have restored the rights of User 1)

This time also we can see the modified by the user as User 1 (Nishant Rana) the flow owner.

For it to run under the context of the user set as “Run As” in When a row is added, modified or deleted trigger, we need to select the Use invoker’s connection setting for the Update a row step.

Let us trigger the flow again through User 2, remember we have Run As set as modifying user.

Interestingly it still shows User 1 as the Modified By user.

Let us again remove the write rights of User 1 and trigger the flow using User 2.

This time flow is successful. If you remember it failed last time when we removed the User 1 rights and the Run as was default Flow Owner.

And this time, it shows modified by as User 2. (as we can see for user 1, the record is read-only as we have the rights removed)

This time it worked because had set Run As as Modifying User and specified Use invoker’s connection for the subsequent step i.e. update a row in this case, so it used User 2’s context which modified the case record to trigger the flow, which in turn updated the lead record using user 2’s context.

Now it will fail if User 1 updates the case record and triggers the flow because it will try to update the lead record using its context i.e. Run as = modified by

We will observe a similar behavior with Run As = Row Owner.

In case the owner of the record is a team, instead of a user, then it falls back to the flow owner option.

Get all the details here – https://docs.microsoft.com/en-us/power-automate/dataverse/create-update-delete-trigger#user-impersonation-using-run-as

Also check – https://d365demystified.com/2020/10/30/run-as-context-in-cds-current-environment-flow-trigger-power-automate/

Hope it helps..

Advertisements

Fixed – Flow client error returned with status code “Forbidden” and details – MissingAdequateQuotaPolicy, the user does not have a service plan adequate for the non-Standard connection in Power Automate


Recently one of the users reported this error while trying to Test a flow.

Request to XRM API failed with error: ‘Message: Flow client error returned with status code “Forbidden” and details “{“error”:{“code”:”MissingAdequateQuotaPolicy”,”message”:”The user ‘8a47d139-662e-4b73-bca3-53a59e8bebeb’ does not have a service plan adequate for the non-Standard connection ‘Microsoft Dataverse’. https://go.microsoft.com/fwlink/?linkid=2123710″,”extendedData”:{}}}”. Code: 0x80060467 InnerError: ‘.

As here the Premium Dataverse connection was being used, the resolution was to either purchase a Per User plan or Per Flow plan or to enable the trial of Power-Automate per user plan.

After the trial was enabled for the user, the error got resolved.

Hope it helps..

Advertisements

Nishant Rana's Weblog

Everything related to Microsoft .NET Technology

Skip to content ↓