限制共用

在受管理環境中,管理員可以限制使用者共用畫布應用程式的範圍。 若要設定這些規則,請從 Power Platform 系統管理中心的環境清單中選取一個受管理的環境。 然後選取命令列上的編輯受管理環境。 共用規則位於限制共用區段。

編輯環境管理設定畫面的螢幕擷取畫面,其中醒目顯示了限制共用。

共用規則

共用規則 選取時的系統行為
不要設定限制 選取此項以不限制共用的畫布應用程式。
排除與安全性群組共用 選取是否允許使用者與任何安全性群組或所有人共用畫布應用程式。
限制可共用的個人總數 如果已選取排除與安全性群組共用,您可以控制可共用畫布應用程式的最大使用者數目。

注意

使用者嘗試共用應用程式時,會強制執行共用規則。 這不會影響在套用共用規則之前已經有權存取該應用程式的任何現有使用者。 但是,如果應用程式在規則設定後不合規,則僅允許取消共用,直到該應用程式符合新規則為止。

在 Power Platform 系統管理中心中設定共用規則之後,可能需要一小時才能開始實施。

當您選取發佈到 Teams 時,Dataverse for Teams 環境中的共用規則不會影響與團隊的共用。 不過,當使用者嘗試與繫結到環境之團隊以外的團隊中個人或群組共用時,會強制執行共用限制。

如果使用者嘗試共用與共用規則矛盾的畫布應用程式,他們將會收到如下所示的通知。

當畫布應用程式不遵循共用規則時的訊息螢幕擷取畫面。

使用 PowerShell 設定共用限制

您也可以使用 PowerShell 設定和移除共用限制。

設定共用限制

以下 PowerShell 指令碼可排除與安全群組共用畫布應用程式,並排除在受控環境中與超過 20 個人共用畫布應用程式。

# Retrieve the environment
$environment = Get-AdminPowerAppEnvironment -EnvironmentName <EnvironmentId>

# Update the Managed Environment settings
$governanceConfiguration = $environment.Internal.properties.governanceConfiguration
$governanceConfiguration.settings.extendedSettings | Add-Member -MemberType NoteProperty -Name 'limitSharingMode' -Value "excludeSharingToSecurityGroups" -Force
$governanceConfiguration.settings.extendedSettings | Add-Member -MemberType NoteProperty -Name 'maxLimitUserSharing' -Value "20" -Force

# Save the updated Managed Environment settings
Set-AdminPowerAppEnvironmentGovernanceConfiguration -EnvironmentName <EnvironmentId> -UpdatedGovernanceConfiguration $governanceConfiguration

移除共用限制

以下是移除了上述指令碼中設定共用限制的 PowerShell 指令碼。

# Retrieve the environment
$environment = Get-AdminPowerAppEnvironment -EnvironmentName <EnvironmentId>

# Update the Managed Environment settings
$governanceConfiguration = $environment.Internal.properties.governanceConfiguration
$governanceConfiguration.settings.extendedSettings | Add-Member -MemberType NoteProperty -Name 'limitSharingMode' -Value "noLimit" -Force
$governanceConfiguration.settings.extendedSettings | Add-Member -MemberType NoteProperty -Name 'maxLimitUserSharing' -Value "-1" -Force

# Save the updated Managed Environment settings
Set-AdminPowerAppEnvironmentGovernanceConfiguration -EnvironmentName <EnvironmentId> -UpdatedGovernanceConfiguration $governanceConfiguration

公開組織的治理錯誤內容

如果您指定治理錯誤訊息內容顯示在錯誤消息中,其將包含在向使用者顯示的錯誤訊息中。 查看 PowerShell 治理錯誤訊息內容指令

另請參閱

受管理環境概觀
啟用受控環境
使用方式深入解析
資料原則
授權
檢視授權耗用 (預覽版)
租用戶設定