{
  "type": "Microsoft.SecurityInsights/dataConnectorDefinitions",
  "apiVersion": "2025-03-01",
  "name": "PingOneAuditLogsCCPDefinition",
  "location": "{{location}}",
  "kind": "Customizable",
  "properties": {
    "connectorUiConfig": {
      "id": "PingOneAuditLogsCCPDefinition",
      "title": "Ping One (via Codeless Connector Framework)",
      "publisher": "Microsoft",
      "descriptionMarkdown": "This connector ingests **audit activity logs** from the PingOne Identity platform into Microsoft Sentinel using a Codeless Connector Framework.",
      "graphQueriesTableName": "PingOne_AuditActivitiesV2_CL",
      "graphQueries": [
        {
          "metricName": "Total audit events received",
          "legend": "Audit Events",
          "baseQuery": "PingOne_AuditActivitiesV2_CL"
        }
      ],
      "sampleQueries": [
        {
          "description": "Get sample audit activity events",
          "query": "PingOne_AuditActivitiesV2_CL\n | take 10"
        }
      ],
      "dataTypes": [
        {
          "name": "PingOne_AuditActivitiesV2_CL",
          "lastDataReceivedQuery": "PingOne_AuditActivitiesV2_CL\n | where TimeGenerated > ago(12h)\n | summarize Time=max(TimeGenerated)"
        }
      ],
      "connectivityCriteria": [
        {
          "type": "HasDataConnectors"
        }
      ],
      "availability": {
        "isPreview": false
      },
      "permissions": {
        "resourceProvider": [
          {
            "provider": "Microsoft.OperationalInsights/workspaces",
            "permissionsDisplayText": "Read and Write permissions are required.",
            "providerDisplayName": "Workspace",
            "scope": "Workspace",
            "requiredPermissions": {
              "read": true,
              "write": true,
              "delete": false,
              "action": false
            }
          }
        ]
      },
      "instructionSteps": [
        {
          "title": "Connect Ping One connector to Microsoft Sentinel",
          "instructions": [
            {
              "type": "Markdown",
              "parameters": {
                "content": "Before connecting to PingOne, ensure the following prerequisites are completed. Refer to the [document](https://github.com/Azure/Azure-Sentinel/blob/master/Solutions/PingOne/README.md) for detailed setup instructions, including how to obtain client credentials and the environment ID."
              }
            },
            {
              "type": "Markdown",
              "parameters": {
                "content": "#### 1. Client Credentials \n You'll need client credentials, including your client id and client secret."
              }
            },
            {
              "type": "Markdown",
              "parameters": {
                "content": "#### 2. Environment Id  \n To generate token and gather logs from audit activities endpoint"
              }
            },
            {
              "type": "DataConnectorsGrid",
              "parameters": {
                "mapping": [
                  {
                    "columnName": "Environment ID",
                    "columnValue": "properties.addOnAttributes.EnvironmentId"
                  }
                ],
                "menuItems": [
                  "DeleteConnector"
                ]
              }
            },
            {
              "type": "ContextPane",
              "parameters": {
                "isPrimary": true,
                "label": "Add domain",
                "title": "Add domain",
                "subtitle": "Add domain",
                "contextPaneType": "DataConnectorsContextPane",
                "instructionSteps": [
                  {
                    "instructions": [
                      {
                        "type": "Textbox",
                        "parameters": {
                          "label": "Client ID",
                          "placeholder": "Enter ID of the client",
                          "type": "text",
                          "name": "clientId",
                          "required": true
                        }
                      },
                      {
                        "type": "Textbox",
                        "parameters": {
                          "label": "Client Secret",
                          "placeholder": "Enter your secret key",
                          "type": "password",
                          "name": "clientSecret",
                          "required": true
                        }
                      },
                      {
                        "type": "Textbox",
                        "parameters": {
                          "label": "Environment ID",
                          "placeholder": "Enter your environment Id ",
                          "type": "text",
                          "name": "environmentId",
                          "required": true
                        }
                      },
                      {
                        "type": "Textbox",
                        "parameters": {
                          "label": "Api domain",
                          "placeholder": "Enter your Api domain Eg.( pingone.com,pingone.eu etc )depending on the region credentials created for ",
                          "type": "text",
                          "name": "apidomain",
                          "required": true
                        }
                      }
                    ]
                  }
                ]
              }
            }
          ]
        }
      ]
    }
  }
}