共用方式為


連接器動作已完成

您可以使用連接器操作控制來允許或阻止指定連接器內的單一操作或觸發程序。

重要

連接器動作控制現在支援觸發器。 這可以透過 PowerShell 進行管理。

透過 Power Platform 系統管理中心變更原則不會刪除透過 PowerShell 新增的觸發程序。

  1. 以系統管理員身分登入,Power Platform 系統管理中心

  2. 在導覽窗格上,選取 [安全性],然後在 [ 安全性 ] 窗格上,選取 [ 資料和隱私權]。

  3. [資料保護和隱私權 ] 頁面上,選取 [ 資料原則]。

  4. 在命令列上選取現有的原則,然後選取 編輯原則,或選取 新增原則 以建立要設定的新原則。

  5. [預先建置的連接器 ] 區段中,選取 [可封鎖的 連接器],然後選取旁邊的 [更多動作 ]。

  6. 選取 [設定連接器] ,然後選取 [連接器動作]。

    選取 [設定連接器] > [連接器動作]。

    注意

    您設定連接器的動作適用於所有可封鎖連接器,但不適用於不可封鎖連接器自訂連接器

  7. 使用側面板允許或拒絕特定動作。

    您也可以設定預設連接器動作設定,以允許或阻止將來新增至連接器的任何新連接器動作。

    設定連接器動作的 [允許] 或 [拒絕]。

已知限制

僅 PowerShell 支援觸發程序

目前僅透過 PowerShell 支援允許和阻止單一觸發程序。 計劃將來支援 Power Platform 系統管理中心。 有關如何允許 Power Automate 流程已使用的觸發程序的範例,請參閱識別已封鎖的 Power Automate 流程

管理員需要讓製作者存取 Power Apps

連接器動作清單是使用代表管理員叫用 Power Apps 來檢索。管理員必須登入 Power Apps 並具有存取權限才能完成使用者同意過程。 如果管理員無權存取 Power Apps,則不會擷取連接器動作清單。

重新發行 Power Apps

某些在 2020 年 10 月 1 日之前發佈的 Power Apps 需要重新發佈連接器動作規則,以強制執行資料原則。

此指令碼可協助管理員和製作者確定必須重新發佈的應用程式。

Add-PowerAppsAccount

$GranularDLPDate = Get-Date -Date "2020-10-01 00:00:00Z"

ForEach ($app in Get-AdminPowerApp){

    $versionAsDate = [datetime]::Parse($app.LastModifiedTime)
    
    $olderApp = $versionAsDate -lt $GranularDLPDate

    $wasBackfilled = $app.Internal.properties.executionRestrictions -ne $null -and $app.Internal.properties.executionRestrictions.dataLossPreventionEvaluationResult -ne $null -and ![string]::IsNullOrEmpty($app.Internal.properties.executionRestrictions.dataLossPreventionEvaluationResult.lastAdvancedBackfillDate) 

    If($($olderApp -and !$wasBackfilled)){
        Write-Host "App must be republished to be Granular DLP compliant: " $app.AppName " "  $app.Internal.properties.displayName " " $app.Internal.properties.owner.email
    } 
    Else{ 
        Write-Host "App is already Granular DLP compliant: " $app.AppName 
    }
}

連接器動作控制項的 PowerShell 支援

擷取連接器的可用動作,使用 Get-AdminPowerAppConnectorAction

Get-AdminPowerAppConnectorAction

例如:

Get-AdminPowerAppConnectorAction -ConnectorName shared_msnweather
ID 類型 屬性
TodaysForecast Microsoft.ProcessSimple/apis/apiOperations 獲取指定位置當天的天氣預報。
OnCurrentWeatherChange Microsoft.ProcessSimple/apis/apiOperations 當指定的天氣度量值更改時觸發新流程。
CurrentWeather Microsoft.ProcessSimple/apis/apiOperations 取得某個位置的目前天氣。
可見性 = 進階
TomorrowsForecast Microsoft.ProcessSimple/apis/apiOperations 獲取指定位置明天的天氣預報。
OnCurrentConditionsChange Microsoft.ProcessSimple/apis/apiOperations 當某個位置的條件發生更改時觸發新流程。

設定原則的連接器動作規則

包含原則之連接器動作規則的物件,會在下列原則中作為連接器設定參考。

連接器設定物件具有下列結構:

$ConnectorConfigurations = @{ 
  connectorActionConfigurations = @( # array – one entry per connector
    @{  
      connectorId # string
      actionRules = @( # array – one entry per rule 
        @{ 
          actionId # string
          behavior # supported values: Allow/Block
        }
      ) 
      defaultConnectorActionRuleBehavior # supported values: Allow/Block
    } 
  ) 
}

擷取資料政策的現有連接器配置

Get-PowerAppDlpPolicyConnectorConfigurations 

為資料策略建立連接器設定

New-PowerAppDlpPolicyConnectorConfigurations

更新資料政策的連接器設定

Set-PowerAppDlpPolicyConnectorConfigurations

範例

目標:

  • 封鎖 MSN 天氣連接器的TodaysForecastCurrentWeather動作,允許所有其他動作。
  • 允許連接器 GitHub 的動作 GetRepositoryById ,並封鎖所有其他動作。

注意

在以下 Cmdlet 中,PolicyName 是指唯一的 GUID。 您可以執行 Get-DlpPolicy Cmdlet 來擷取資料政策 GUID。

$ConnectorConfigurations = @{ 
  connectorActionConfigurations = @(
    @{  
      connectorId = "/providers/Microsoft.PowerApps/apis/shared_msnweather" 
      actionRules = @(
        @{ 
          actionId = "TodaysForecast" 
          behavior = "Block"
        }, 
        @{ 
          actionId = "CurrentWeather" 
          behavior = "Block"
        } 
      ) 
      defaultConnectorActionRuleBehavior = "Allow"
    },
    @{  
      connectorId = "/providers/Microsoft.PowerApps/apis/shared_github" 
      actionRules = @(
        @{ 
          actionId = "GetRepositoryById" 
          behavior = "Allow"
        }
      ) 
      defaultConnectorActionRuleBehavior = "Block"
    } 
  ) 
}
New-PowerAppDlpPolicyConnectorConfigurations -TenantId $TenantId -PolicyName $PolicyName -NewDlpPolicyConnectorConfigurations $ConnectorConfigurations