共用方式為


連接器動作已完成

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

重要

2025年2月,連接器動作控制中新增了對觸發程序的支援。 這可以透過 PowerShell 進行管理。 未來 Power Platform 系統管理中心也計劃支援觸發程序。

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

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

  2. 在左側導覽窗格中,選取原則>資料原則

  3. 選取原則,然後選取命令列上的編輯原則

  4. 在左側的選單中,選取預建連接器

  5. 選擇連接器旁邊的更多動作,然後選取設定連接器>連接器動作

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

    注意

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

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

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

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

已知限制

僅 PowerShell 支援觸發程序

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

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

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

重新發行 Power Apps

某些 Power Apps 在 2020 年 10 月 1 日之前發佈的連接器動作規則需要重新發佈,以強制實施數據丟失防護 (DLP)。

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

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
識別碼 類型​ 內容
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
    } 
  ) 
}

擷取 DLP 原則的現有連接器設定

Get-PowerAppDlpPolicyConnectorConfigurations 

建立 DLP 原則的連接器設定

New-PowerAppDlpPolicyConnectorConfigurations

更新 DLP 原則的連接器設定

Set-PowerAppDlpPolicyConnectorConfigurations

範例

目標:

  • 阻止動作 TodaysForecast 與連接器 MSN 天氣的 CurrentWeather;允許所有其他動作。
  • 允許動作 GetRepositoryById 的連接器 GitHub;阻止所有其他動作。

Note

在以下 Cmdlet 中,PolicyName 是指唯一的 GUID。 您可以執行 Get-DlpPolicy Cmdlet 來擷取 DLP 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