次の方法で共有


ACICollaborationAudit テーブルのクエリ

Azure portal でこれらのクエリを使用する方法については、 Log Analytics のチュートリアルを参照してください。 REST API については、「 Query」を参照してください。

パイプラインの実行ごとにリソースに許可された許可は何回ですか?

パイプラインの実行中にリソースに対してアクセス権が付与された回数を返します。 付与の種類 (エンタイトルメント (運用モードの参加者別)、参照先 (テスト モードの参加者別)、または所有者 (リソースの所有者別) でグループ化されます。

//=================================================================================================================================================================
// summarize by CorrelationId groups audits by pipeline run. For more details about summarize see: https://docs.microsoft.com/en-us/azure/data-explorer/kusto/query/summarizeoperator
ACICollaborationAudit
| summarize PipelineExecutedOn=max(TimeGenerated), ResourceAccessGrantCount=count(), EntitlementResult=array_strcat(make_set(EntitlementResult), ',') by CorrelationId, GrantType, TargetResourceId
| project-away CorrelationId
| order by PipelineExecutedOn desc, TargetResourceId asc
| top 100 by PipelineExecutedOn;

リソースに付与された権利は何ですか?

CI リソースに付与された権利を検索します。 特定のリソースのクエリに使用できます。

//==============================================================================================
// For specific results, insert values in the let statements and uncomment the where filters within the query
// let partialResourceId = "<Full or Partial resource name (DataAsset, DataSet or Script) to look for (e.g. "dataassets/e2etest2020qqigqeqp">");
ACICollaborationAudit
| where GrantType == 'Entitlement'
//| where TargetResourceId has partialResourceId
| extend ShortOperationName=tostring(array_slice(split(OperationName, '/'), -1, -1)[0])
| summarize TimeGenerated=max(TimeGenerated), EntitlementResult=array_strcat(make_set(EntitlementResult), ','), 
            GrantSource=any(GrantSource), GrantSourceType=any(GrantSourceType),
            TargetResourceId=any(TargetResourceId), TargetResourceType=any(TargetResourceType), ParticipantName=any(ParticipantName),
            OperationName=any(ShortOperationName)
    by GrantCorrelationId
| project-away GrantCorrelationId
| order by TimeGenerated desc
| limit 100;

エンタイトルメントによってアクセス権が付与されたリソースは何ですか?

アクセス権を持つ CI リソースを検索します。 特定のエンタイトルメントを照会するために使用できます。

//============================================================================================
// For specific results, insert values in the let statements and uncomment the where filters within the query
// let entitlementOrContract = "<Full or Partial entitlement (or contract) name to look for (e.g. "proposals/e2etest2020qytcbkar","entitlements/e2etest2020nzutiqca">");
ACICollaborationAudit 
| where GrantType == 'Entitlement'
//| where GrantSource has entitlementOrContract
| extend ShortOperationName=tostring(array_slice(split(OperationName, '/'), -1, -1)[0])
| summarize TimeGenerated=max(TimeGenerated), EntitlementResult=array_strcat(make_set(EntitlementResult), ','),
            TargetResourceId=any(TargetResourceId), TargetResourceType=any(TargetResourceType), 
            ParticipantName=any(ParticipantName), GrantSource=any(GrantSource), GrantSourceType=any(GrantSourceType),
            OperationName=any(ShortOperationName)
    by GrantCorrelationId
| project-away GrantCorrelationId
| order by TimeGenerated desc
| limit 100;

リソースへのアクセス権が付与された参加者はどれですか?

CI リソースへのアクセスが許可された参加者を見つけます。 特定のリソースのクエリに使用できます。

//=====================================================================================================
// For specific results, insert values in the let statements and uncomment the where filters within the query
// let partialParticipantName = "<Full or Partial participant (or tenant) name to look for (e.g. "propmtion.dept@contoso">");
ACICollaborationAudit 
| where GrantType == 'Entitlement'
//| where ParticipantName contains partialParticipantName
| extend ShortOperationName=tostring(array_slice(split(OperationName, '/'), -1, -1)[0])
| summarize TimeGenerated=max(TimeGenerated), EntitlementResult=array_strcat(make_set(EntitlementResult), ','),
            TargetResourceId=any(TargetResourceId), TargetResourceType=any(TargetResourceType), 
            GrantSource=any(GrantSource), GrantSourceType=any(GrantSourceType),
            OperationName=any(ShortOperationName), ParticipantName=any(ParticipantName)
    by GrantCorrelationId
| project-away GrantCorrelationId
| order by TimeGenerated desc
| limit 100;