Building and customizing solutions using Microsoft 365 Copilot APIs and tools
Issue with Power Platform API reassign and Copilot Studio
Fornalczyk, Mateusz
5
Reputation points
For governance process I'm trying to reassign the owner of Copilot Studio Agent from service principal to an actual user.
I implemented the API action
POST https://api.powerplatform.com/copilotstudio/environments/{EnvironmentId}/bots/{BotId}/api/botAdminOperations/reassign?api-version=1
via custom connector and I'm using my global administrator account for the connection.
To the main issue - when I try running it on an agent in my Dev environemnt in unamanaged solution every thing works great it returns 204. But when I try to do it in the target environment it returns 500 error. All the Ids are correct ones including users entra object id
{
"ErrorCode": 500,
"ErrorMessage": "Sequence contains no elements",
"DiagnosticsMessage": null,
"ErrorInfo": null
}
Microsoft Copilot | Microsoft 365 Copilot | Development
Microsoft Copilot | Microsoft 365 Copilot | Development
Sign in to answer