Skip to main content

pa app owner set

Sets a new owner for a Power Apps app

Usage

m365 pa app owner set [options]

Options

-e, --environmentName <environmentName>

The name of the environment.

--appName <appName>

The name (GUID) of the Microsoft Power App.

--userId [userId]

The Microsoft Entra ID of the new owner. Specify either userId or userName but not both.

--userName [userName]

The user principal name of the new owner. Specify either userId or userName but not both.

--roleForOldAppOwner [roleForOldAppOwner]

Grant permissions for the previous owner. Allowed values: CanView, CanEdit. Don't specify a value to remove the previous owner from the app.

-h, --help [help]

Output usage information. Optionally, specify which section of command's help you want to see. Allowed values are options, examples, remarks, response, full. Default is options.

--query [query]

JMESPath query string. See http://jmespath.org/ for more information and examples.

-o, --output [output]

Output type. json, text, csv, md, none. Default json.

--verbose

Runs command with verbose logging.

--debug

Runs command with debug logging.

Remarks

info

To use this command you must be a Global or Power Platform admin.

Examples

Set a new owner for a Power Apps app and make the previous owner co-owner

m365 pa app owner set --environmentName Default-716eb9fb-bf79-4be9-b0c7-900824fcbe25 --appName 7ab97923-4a4d-4467-b030-12071d2b810b --userId c6ee6ed4-0172-4fdc-87a3-cfd9c324de1d --roleForOldAppOwner CanEdit

Set a new owner for a Power Apps app and remove the previous owner

m365 pa app owner set --environmentName Default-716eb9fb-bf79-4be9-b0c7-900824fcbe25 --appName 7ab97923-4a4d-4467-b030-12071d2b810b --userName john.doe@contoso.com

Response

The command won't return a response on success.

CTRL + M