Loading...

{How to} Reassign an copilot agent's owner with Power Platform API

{How to} Reassign an copilot agent's owner with Power Platform API
Hello Everyone,



Today I am going to share my thoughts on how to reassign an copilot agent's owner with the Power Platform API.





Let's get started.


Here are the simple steps to reassign a Copilot Agent Owner using the Power Platform API.

This uses Microsoft Copilot Studio agents stored in Microsoft Dataverse.


Shorter version:

  • Get API token

  • Get botid

  • Get systemuserid of new owner

  • Send PATCH request to update ownerid




Step 1: Get the Environment URL

Find your Power Platform Environment URL.


Example:

https://yourenvironment.crm.dynamics.com



Step 2: Get an Access Token

Authenticate using Microsoft Entra ID.

You must obtain a Bearer token to call the Power Platform API.

Scope:

https://yourenvironment.crm.dynamics.com/default


Step 3:  Get the Copilot Agent ID

Call the API to list agents.

Get https://yourenvironment.crm.dynamics.com/api/data/v9.2/bots


Response example:

JSON

{
 "botid": "11111111-2222-3333-4444-555555555555",
 "name": "CustomerSupportCopilot"
}

Copy the botid.



Step 4: Get the New Owner User ID

Retrieve the user you want to assign.

GET https://yourenvironment.crm.dynamics.com/api/data/v9.2/systemusers

Find the systemuserid of the new owner.


Step 5: Reassign the Copilot Agent

Send a PATCH request to update the owner.

PATCH https://yourenvironment.crm.dynamics.com/api/data/v9.2/bots(BOT_ID)



Body:

JSON

{
 "[email protected]": "/systemusers(NEW_USER_ID)"
}


Example:  

JSON
{
 "[email protected]": "/systemusers(99999999-8888-7777-6666-555555555555)"
}





Result:

The Copilot agent is now owned by the new user.



That's it for today.

Until next blog post
Happy Copiloting 

aka @uk365guy.






Published on:

Learn more
Need help with this product?

We can help you with {How to} Reassign an copilot agent's owner with Power Platform API

If you want help implementing, troubleshooting, or improving this product, contact us and we’ll point you in the right direction.

MICROSOFT DYNAMICS CRM /365  BLOG
MICROSOFT DYNAMICS CRM /365 BLOG

This blog is all about MS DYNAMICS CRM DEVELOPMENT, C# .NET,SQL SERVER

Share post:

Related posts

{How to} use code interpreter on customer uploaded files in agent conversations in copilot studio

Hello Everyone,Today I am going to share my thoughts on the use of the code interpreter on customer-uploaded files in agent conversations in c...

4 months ago

{Do you know}Evaluate test sets with multiple graders in Copilot Studio

Hello Everyone,Today I am going to share my thoughts on the evaluation test sets with multiple graders in Copilot Studio.Let's get started.Yes...

5 months ago

{How to } Make Power Page Portal WCAG 2.1 Level A and AA Standards

Hello Everyone,Today I am going to share my thoughts on how to make power pages portal according to the WCAG 2.1 Level A and AA Standards.Let'...

5 months ago

{How to }Make your copilot multilingual in Microsoft Copilot Studio

Hello Everyone,Today I am going to show how to enable Microsoft Copilot Studio Multilingual.Let's get started.To make your Microsoft Copilot (...

5 months ago

{How to} Use IVR with Omnichannel for customer service in Copilot Studio

Hello Everyone,Today i am going to share my thoughts on using IVR with Omnichannel for Customer Service in Copilot Studio.Let's get started.To...

5 months ago

{How to} Enhance IVR with generative answers optimized for voice in Copilot Studio

Hello Everyone,Today I am going to share my thoughts on the Enhancing IVR with generative answers optimised for voice in Copilot Studio.To enh...

5 months ago

{How to} Use answering machine detection and proactive engagement tools in Copilot Studio

Hello Everyone,Today I am going to share my thoughts on how answering machine detection and proactive engagement tools work.Let's get started....

5 months ago

{How to } Publish Copilot Agents to WhatsApp

Hello Everyone,Today i am going to share my thoughts on how to publish the copilot agent to whatsapp channel.Let's get started.To publish a Mi...

5 months ago

{How to} Request Information from humans in the loop in Copilot Studio Agent flows

Hello Everyone,Today I am going to share my thoughts on how to request information from humans in the loop in Copilot Studio Agent flows.Let's...

5 months ago

{Do you know} Business impact of Copilot Studio Agents in Viva Insights

Hello Everyone,Today I am going to share my thoughts on analysing the business impact of Copilot Studio Agents in Viva Insights.Let's get star...

1 year ago

Newsletter

Get the latest Dynamics 365 and Power Platform content in your inbox

A curated digest of community blogs, product news, videos, and podcasts — delivered without the noise.

Weekly updates Unsubscribe anytime Fresh community picks
We use your email only for the newsletter and you can unsubscribe at any time.
By subscribing, you agree to the privacy policy.