キャンバスアプリの所有者を変更する必要が出たので、そのやり方をメモ。
やりたいこと
今回はアプリ「WanSample」の所有者を「わんさん」から「うさぎさん」に変えてみる。


必要なモジュールのインストール
まずはPower Shellを管理者権限で開いて、必要なモジュールをインストールする。


Install-Module -Name Microsoft.PowerApps.Administration.PowerShell Install-Module -Name Microsoft.PowerApps.PowerShell –AllowClobber
所有者変更に必要な情報
続いて所有者変更のために必要な情報を集めていく。
環境ID
まずは環境ID。右上歯車から「開発者リソース」を選択する。


そうすると環境IDが表示されるのでこれをメモ。


アプリID
続いてアプリID。アプリのコンテキストメニューから「詳細」を選択して、


表示されるアプリIDをメモ。


所有者にするユーザーのID
最後に所有者に設定するユーザーのID。AADのオブジェクトIDをメモする。


これで準備完了!
所有者の変更
所有者変更のコマンドはちら。
Set-AdminPowerAppOwner -AppName アプリID -EnvironmentName 環境ID -AppOwner 所有者にするユーザーのID
このコマンドを実行すると、


こんな感じで所有者を変更することができる!


コメント