Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CoE Starter Kit - BUG] CLEANUP HELPER - Power Apps User Shared With - Service Principal Upsert failed #9452

Open
1 task done
DoubleD-1211 opened this issue Dec 27, 2024 · 2 comments
Labels
bug Something isn't working Cloud Flow Issues related to CoE Kit Cloud Flow Execution coe-starter-kit CoE Starter Kit issues To Triage

Comments

@DoubleD-1211
Copy link

Does this bug already exist in our backlog?

  • I have checked and confirm this is a new bug.

Describe the issue

In the flow CLEANUP HELPER - Power Apps User Shared With, we have an issue when the flow wants to "upsert" the service principal into Power Platform Users table.
It triggers this error:

{
  "error": {
    "code": "0x80040237",
    "message": "A record with matching key values already exists.",
    "@Microsoft.PowerApps.CDS.ErrorDetails.SqlExceptionMessage": "Violation of PRIMARY KEY constraint 'PK_admin_PowerPlatformUserBase'. Cannot insert duplicate key in object 'dbo.admin_PowerPlatformUserBase'. The duplicate key value is <redacted>.",
    "@Microsoft.PowerApps.CDS.HelpLink": "http://go.microsoft.com/fwlink/?LinkID=398563&error=Microsoft.Crm.CrmException%3a80040237&client=platform",
    "@Microsoft.PowerApps.CDS.InnerError.Message": "Cannot insert duplicate key."
  }
}

As this box "Upsert New Service Principal", the action shouldn't be a create but an update and the error won't show up.
To find this action:

Scope: Get Power Apps User Shared With Data
For each: Walk the Apps in this Envt
Scope: Update Roles Information
Scope: Roles Exist
Scope: Ensure all Users exist
For each: Apply to each New User to Add
Switch: Switch On new user to add type
Case: Service Principal
Dataverse action: Upsert New Service Principal

Expected Behavior

No error triggered as the user already exists and an update it done.

What solution are you experiencing the issue with?

Core

What solution version are you using?

4.45

What app or flow are you having the issue with?

CLEANUP HELPER - Power Apps User Shared With

What method are you using to get inventory and telemetry?

Cloud flows

Steps To Reproduce

We are not sure of the way to reproduce because we have a lot of env in our tenant. But we assume that this errors occurs when you have a service principal into different app.

Anything else?

No response

@DoubleD-1211 DoubleD-1211 added bug Something isn't working coe-starter-kit CoE Starter Kit issues labels Dec 27, 2024
@DoubleD-1211
Copy link
Author

It seems to be the same with groups.

@Grant-Archibald-MS
Copy link
Collaborator

@DoubleD-1211 we are back this week after holiday season and have added your issue as part of issues triage as part of [CoE Starter Kit - BUG] Jan 2025 Bug Triage #9473

@Grant-Archibald-MS Grant-Archibald-MS added Cloud Flow Issues related to CoE Kit Cloud Flow Execution and removed Cloud Flow Issues related to CoE Kit Cloud Flow Execution labels Jan 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Cloud Flow Issues related to CoE Kit Cloud Flow Execution coe-starter-kit CoE Starter Kit issues To Triage
Projects
Status: No status
Development

No branches or pull requests

2 participants