web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Error "environment is ...
Power Automate
Unanswered

Error "environment is linked to a new CDS 2.0 instance" getting environment roles

(4) ShareShare
ReportReport
Posted on by 609

Hi,

I want to restrict creation of apps and flows in an environment (users should still be able to see and run flows). To do this I want to t remove the Environment Maker roles from all users in the environment. Because there are over a thousand users I'm building a flow to do it. At the beginning of the flow, I want to get all users with the Environment Maker role. I'm using the Connector "Power Platform for Admins" and the action "List Environment Role Assignments". When I execute the flow I get an error message:

 

The environment 'xxx' is linked to a new CDS 2.0 instance. The operation 'GET/PROVIDERS/MICROSOFT.BUSINESSAPPPLATFORM/SCOPES/ADMIN/ENVIRONMENTS/ROLEASSIGNMENTS' is forbidden for linked environments.

 

This environment used to be our default environment. After some restructuring we set a different environment as the default environment.

What is causing this error and how can I get rid of it?

Categories:
I have the same question (0)
  • Zrouatbi Profile Picture
    21 on at

    Hi @leo85 

     

    Did you manage to fix this?

     

    I am getting the same error and I have no clue what this error mean.

     

    Thank you

     

  • VVS_Pothan Profile Picture
    3 on at

    Hi all,

     

    I'm facing the same issue.

    VVS_Pothan_0-1676981127107.png

    Error: The environment ' ' is linked to a new CDS 2.0 instance. The operation 'GET/PROVIDERS/MICROSOFT.BUSINESSAPPPLATFORM/SCOPES/ADMIN/ENVIRONMENTS/ROLEASSIGNMENTS' is forbidden for linked environments.

     

    Do any one has any resolution?

     

    Thanks in advance

  • FemaleMarvel365 Profile Picture
    57 on at

    I'm Also receiving this same message is there a reason? I see no one has responded to this issue yet.

  • RandomDept Profile Picture
    696 on at

    Same error, piggybacking to see if there is an update

  • Suggested answer
    _daveB Profile Picture
    6 on at
    Hi,
     
    There is a solution with dataverse tables for this.
    To read the roles you can List the User Rows, expand the systemuserroles_Association and the fetch the json-Body. Afer you loop over the users as well as the roles per user in the fetched json to access the roles.
    Afterwards you can perform any bound/unbound action with the Microsoft Dataverse connector.
     
    Here it is important to expant the query with "systemuserroles_association". For your use case the filter as well as the row count will look differently.
     
    Then you fetch the response body json from the action before.
     
    Afterwards you are able to loop through every user and the assigned roles to read data:
     
    Afterwards you can perform any actions of the existing data or add some new. I needed to assign Security roles to a User, so here I used the "Relate rows in selected environment" action. 
  • Suggested answer
    DT-15010503-0 Profile Picture
    2 on at
    I know this is an old post, but it looks like there have been some users (like myself) that are still getting hung up on this error. 
     
    After looking into it further, the answer I've come to is that this connector is not designed by Microsoft to be used with environments that are connected to dataverse. https://learn.microsoft.com/en-us/connectors/powerplatformforadmins/#list-environment-role-assignments
     
    It's not spelled out in the documentation, but my guess is because environments without a Dataverse database have only the two roles of Environment Maker and Environment Admin. So the connector is set up to just check those two roles. But environments with Dataverse have theoretically unlimited custom security roles that can be assigned, so the connector is not designed to handle those environments. 
     
    As far as a way to get to that role information for those environments with Dataverse, daveB's solution is what I'm going to be implementing. 

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 522 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 364 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard