Skip to main content

Notifications

Power Automate - General Discussion
Suggested answer

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

(4) ShareShare
ReportReport
Posted on by 598

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?

  • Suggested answer
    _daveB Profile Picture
    _daveB 6 on at
    Error "environment is linked to a new CDS 2.0 instance" getting environment roles
    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. 
  • RandomDept Profile Picture
    RandomDept 603 on at
    Re: Error "environment is linked to a new CDS 2.0 instance" getting environment roles

    Same error, piggybacking to see if there is an update

  • FemaleMarvel365 Profile Picture
    FemaleMarvel365 55 on at
    Re: Error "environment is linked to a new CDS 2.0 instance" getting environment roles

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

  • VVS_Pothan Profile Picture
    VVS_Pothan 3 on at
    Re: Error "environment is linked to a new CDS 2.0 instance" getting environment roles

    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

  • Zrouatbi Profile Picture
    Zrouatbi 21 on at
    Re: Error "environment is linked to a new CDS 2.0 instance" getting environment roles

    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

     

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

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,495

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,822

Leaderboard