2 minute read

I might be the first one to come up with the term “Deagentification”. It is what it says - disabling AI. The following blogpost will show you how to remove Copilot, agents and other AI clutter from your Dataverse-backed environment (and possibly more). I will keep this post updated with the latest turn off switches. 🙂

Option 1: Power Platform Admin center (PPAC)Permalink

Ideal when you managed just one or maybe a handful of environments without a healthy ALM process established.

  1. Open https://admin.powerplatform.microsoft.com/manage/environments
  2. Open the target environment and hit Settings and then Features
    • All features here are well described and you should be able to clearly understand what you are disabling.
    • Its very likely that any newly released AI and Copilot features will be added here as well for you to turn them off.
  3. I would recommend turning off the following:
    1. AI form fill assistance: Automatic suggestion - suggests content when editing form, good idea with the poorest execution.
    2. All setting under Copilot section
    3. AI builder
    4. AI prompts

Option 2: Solution ComponentsPermalink

Suitable when you want to distribute Deagentification across multiple environments or code-first approach is your jam.

  1. Open https://make.preview.powerapps.com/
  2. Select your environment and create a new solution
  3. Add the following existing components from the Setting category
    1. AI insight cards on forms (logical name EnableFormInsights)
    2. Allow AI to generate predictions on edit forms. (logical name FormPredictEnabled)
    3. Copilot control (logical name appcopilotenabled)
    4. Enable Copilot answer control (logical name EnablEnableCopilotAnswerControleFormInsights)
  4. Set properties of the components to false or 1 based on the input type and publish the changes.
  5. From here you can export the solution and distribute the changes to other environments.
  6. Every environment has an table called ‘organization’. In its data you will find exactly one record named after your environment. It’s used for storing some of the settings of your environment. You can update the following properties of that record
    1. Display Preview Feature for this organization (logical name paipreviewscenarioenabled)
    2. Enable bot for makers. (logical name powerappsmakerbotenabled)
    3. Enable AI Promps (logical name aipromptsenabled)
  7. If you want to distribute changes to the organization record, you can use the code samples below.

Code approach to update the organization recordPermalink

Simple JavaScript snippet which you can run in your model-driven app DevTools console:

const data = await Xrm.WebApi.retrieveMultipleRecords("organization",`?$select=organizationid,name`)
await Xrm.WebApi.updateRecord("organization", data.entities[0]['organizationid'], { 
    ["paipreviewscenarioenabled"]: false,
    ["powerappsmakerbotenabled"]: false,
    ["aipromptsenabled"]: false
})

Sample C# code to include in your package deployer code extension.

private void DisableDataverseAiTools(CrmServiceClient CrmSvc)
        {
            CreateProgressItem("Disabling AI helper tools");
            QueryExpression query = new("organization")
            {
                TopCount = 1,
                ColumnSet = new ColumnSet("organizationid"),
                Criteria = new FilterExpression
                {
                    FilterOperator = LogicalOperator.Or,
                    Conditions = {
                                new ConditionExpression{
                                    AttributeName = "paipreviewscenarioenabled",
                                    Operator = ConditionOperator.Equal,
                                    Values = { true }
                                },
                                new ConditionExpression{
                                    AttributeName = "powerappsmakerbotenabled",
                                    Operator = ConditionOperator.Equal,
                                    Values = { true }
                                },
                                new ConditionExpression{
                                    AttributeName = "aipromptsenabled",
                                    Operator = ConditionOperator.Equal,
                                    Values = { true }
                                }
                            },
                }
            };

            var organizationRecord = CrmSvc.RetrieveMultiple(query);
            if (organizationRecord.Entities.Count > 0)
            {
                CrmSvc.Update(new Entity("organization", new Guid(organizationRecord.Entities[0]["organizationid"].ToString()))
                {
                    ["paipreviewscenarioenabled"] = false,
                    ["powerappsmakerbotenabled"] = false,
                    ["aipromptsenabled"] = false
                });
            }

SourcesPermalink

https://learn.microsoft.com/en-us/power-apps/maker/canvas-apps/ai-overview#disable-copilot-in-power-apps

https://learn.microsoft.com/en-us/power-apps/developer/data-platform/webapi/reference/organization?view=dataverse-latest

To submit comments, go to GitHub Discussions.