1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

Dynamics365/PowerAppsモデル駆動アプリの所有者変更

Posted at

PowerApp キャンパスアプリの所有者変更は、以下のURLにあるSet-AdminPowerAppOwnerコマンドで行う可能ですが、モデル駆動アプリの所有者変更方法が提供されていません。
https://docs.microsoft.com/ja-jp/power-platform/admin/powerapps-powershell

モデル駆動アプリの所有者は作成時のログインユーザになります。所有者を変更する場合、モデル駆動アプリを再作成するのは手間がかかるので、Solutionで再インポートで変更できるかを検証したいと思います。

まずモデル駆動アプリはどのような構成になるかを確認したいと思います。
先にソリューションを作成して、モデル駆動アプリのみを追加してエクスポートしてみましょう。(Unmanaged SolutionとしてExport)
image.png
エクスポートしたzipを解凍して、中のcustomizations.xmlを開きます。

customizations.xml
<ImportExportXml xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <Entities></Entities>
  <Roles></Roles>
  <Workflows></Workflows>
  <FieldSecurityProfiles></FieldSecurityProfiles>
  <Templates />
  <EntityMaps />
  <EntityRelationships />
  <OrganizationSettings />
  <optionsets />
  <CustomControls />
  <AppModules>
    <AppModule>
      <UniqueName>new_TestApp</UniqueName>
      <IntroducedVersion>1.0.0.0</IntroducedVersion>
      <WebResourceId>953b9fac-1e5e-e611-80d6-00155ded156f</WebResourceId>
      <OptimizedFor></OptimizedFor>
      <statecode>0</statecode>
      <statuscode>1</statuscode>
      <FormFactor>1</FormFactor>
      <ClientType>4</ClientType>
      <NavigationType>0</NavigationType>
      <AppModuleComponents>
        <AppModuleComponent type="62" schemaName="new_TestApp" />
        <AppModuleComponent type="29" id="{006c4c42-2abe-4b61-9149-56df5b9625f9}" />
        <AppModuleComponent type="29" id="{0ffbcde4-61c1-4355-aa89-aa1d7b2b8792}" />
        <AppModuleComponent type="29" id="{919e14d1-6489-4852-abd0-a63a6ecaac5d}" />
        <AppModuleComponent type="29" id="{3e8ebee6-a2bc-4451-9c5f-b146b085413a}" />
        <AppModuleComponent type="29" id="{1e1bdcbb-aeb9-4f51-b5b8-3beae2ef02ac}" />
        <AppModuleComponent type="60" id="{351c4635-47a7-e911-8199-000d3af92e18}" />
        <AppModuleComponent type="60" id="{d1f511a8-1ead-e211-bb72-00155da9a201}" />
        <AppModuleComponent type="60" id="{3b5d39a7-b216-e711-80d8-00155d896f83}" />
        <AppModuleComponent type="60" id="{25b754f5-7563-df11-ae90-00155d2e3002}" />
        <AppModuleComponent type="1" schemaName="msdyn_iotalert" />
        <AppModuleComponent type="1" schemaName="actioncard" />
        <AppModuleComponent type="1" schemaName="incident" />
        <AppModuleComponent type="1" schemaName="msdyn_iottocaseprocess" />
        <AppModuleComponent type="1" schemaName="phonetocaseprocess" />
        <AppModuleComponent type="1" schemaName="lead" />
        <AppModuleComponent type="1" schemaName="leadtoopportunitysalesprocess" />
        <AppModuleComponent type="1" schemaName="opportunity" />
        <AppModuleComponent type="1" schemaName="opportunitysalesprocess" />
        <AppModuleComponent type="1" schemaName="new_bpf_1e1bdcbbaeb94f51b5b83beae2ef02ac" />
        <AppModuleComponent type="1" schemaName="activitypointer" />
        <AppModuleComponent type="1" schemaName="account" />
        <AppModuleComponent type="60" id="{fb65cc73-181c-468b-9bb3-82ecde306991}" />
        <AppModuleComponent type="60" id="{76b81f10-2a08-4f1a-9454-ee38bea94eb5}" />
        <AppModuleComponent type="60" id="{2205c86d-ed88-4a2f-a447-3b86a8781f2e}" />
        <AppModuleComponent type="60" id="{43300723-f867-420b-ab28-976a4d12e6c4}" />
        <AppModuleComponent type="60" id="{8448b78f-8f42-454e-8e2a-f8196b0419af}" />
        <AppModuleComponent type="60" id="{b028db32-3619-48a5-ac51-cf3f947b0ef3}" />
        <AppModuleComponent type="60" id="{c9e7ec2d-efca-4e4c-b3e3-f63c4bba5e4b}" />
        <AppModuleComponent type="60" id="{69cff312-cfb6-4289-9631-249ab85d2c62}" />
        <AppModuleComponent type="60" id="{098ae145-1567-41ec-8398-86dbaac70c9b}" />
        <AppModuleComponent type="26" id="{00000000-0000-0000-00aa-000010001002}" />
        <AppModuleComponent type="26" id="{65ffaf9a-e8c5-432d-860b-32f841b00d87}" />
        <AppModuleComponent type="26" id="{59e57080-0cc2-e211-9b83-00155d89b902}" />
        <AppModuleComponent type="26" id="{00000000-0000-0000-00aa-000000666000}" />
        <AppModuleComponent type="26" id="{38a21ffb-4e32-4038-beb9-03172a0dd034}" />
        <AppModuleComponent type="26" id="{00000000-0000-0000-00aa-000010001200}" />
        <AppModuleComponent type="26" id="{a9af0ab8-861d-4cfa-92a5-c6281fed7fab}" />
        <AppModuleComponent type="1" schemaName="contact" />
        <AppModuleComponent type="1" schemaName="goal" />
      </AppModuleComponents>
      <AppModuleRoleMaps>
        <Role id="{119f245c-3cc8-4b62-b31c-d1a046ced15d}" />
        <Role id="{627090ff-40a3-4053-8790-584edc5be201}" />
      </AppModuleRoleMaps>
      <LocalizedNames>
        <LocalizedName description="TestApp" languagecode="1041" />
      </LocalizedNames>
    </AppModule>
  </AppModules>
  <EntityDataProviders />
  <Languages>
    <Language>1041</Language>
  </Languages>
</ImportExportXml>

Role設定とAppModuleComponentsが管理されています。
上記にはないですが、appSettingが設定される場合もエクスポートされるはずです。

あまり複雑な内容を管理するではないので、再インポートを検証してみます。
先ほどソリューションをエクスポートしたので、これからモデル駆動アプリを物理作成します。
image.png
image.png

別のユーザー(新しい所有者)でログインして、エクスポートしたソリューションをインポートする。
image.png

インポートが終わりましたら、すべてのカスタマイズの公開のボタンで公開を実施します。
image.png

モデル駆動アプリの所有者がログインユーザになることが確認できます。
image.png

モデル駆動アプリの全ての設定も復元されることも確認できます。

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?