{
  "version": "Notebook/1.0",
  "items": [
    {
      "type": 1,
      "content": {
        "json": "**NOTE**: This data connector depends on a parser based on Kusto Function **GWorkspaceActivityReports** to work as expected. [Follow steps to get this Kusto Function](https://aka.ms/sentinel-googleworkspace-parser)"
      },
      "name": "text - 8"
    },
    {
      "type": 9,
      "content": {
        "version": "KqlParameterItem/1.0",
        "parameters": [
          {
            "id": "cd8447d9-b096-4673-92d8-2a1e8291a125",
            "version": "KqlParameterItem/1.0",
            "name": "TimeRange",
            "type": 4,
            "description": "Sets the time name for analysis",
            "value": {
              "durationMs": 7776000000
            },
            "typeSettings": {
              "selectableValues": [
                {
                  "durationMs": 900000
                },
                {
                  "durationMs": 3600000
                },
                {
                  "durationMs": 86400000
                },
                {
                  "durationMs": 604800000
                },
                {
                  "durationMs": 2592000000
                },
                {
                  "durationMs": 7776000000
                }
              ]
            },
            "timeContext": {
              "durationMs": 86400000
            }
          }
        ],
        "style": "pills",
        "queryType": 0,
        "resourceType": "microsoft.operationalinsights/workspaces"
      },
      "name": "parameters - 11"
    },
    {
      "type": 3,
      "content": {
        "version": "KqlItem/1.0",
        "query": "GWorkspaceActivityReports\r\n| make-series TotalEvents = count() default = 0 on TimeGenerated from {TimeRange:start} to {TimeRange:end} step {TimeRange:grain};",
        "size": 0,
        "title": "Events Over Time",
        "timeContext": {
          "durationMs": 7776000000
        },
        "timeContextFromParameter": "TimeRange",
        "queryType": 0,
        "resourceType": "microsoft.operationalinsights/workspaces",
        "visualization": "timechart",
        "graphSettings": {
          "type": 0
        }
      },
      "customWidth": "55",
      "name": "query - 12",
      "styleSettings": {
        "maxWidth": "55"
      }
    },
    {
      "type": 3,
      "content": {
        "version": "KqlItem/1.0",
        "query": "  GWorkspaceActivityReports\r\n  | where isnotempty(AppName) \r\n  | summarize Applications = count() by AppName",
        "size": 3,
        "title": "Applications",
        "timeContext": {
          "durationMs": 7776000000
        },
        "timeContextFromParameter": "TimeRange",
        "queryType": 0,
        "resourceType": "microsoft.operationalinsights/workspaces",
        "visualization": "piechart"
      },
      "customWidth": "30",
      "name": "query - 0",
      "styleSettings": {
        "maxWidth": "30"
      }
    },
    {
      "type": 12,
      "content": {
        "version": "NotebookGroup/1.0",
        "groupType": "editable",
        "items": [
          {
            "type": 3,
            "content": {
              "version": "KqlItem/1.0",
              "query": "GWorkspaceActivityReports\r\n  | where IsSuspicious == \"true\" \r\n  | count ",
              "size": 3,
              "title": "Suspicious events",
              "queryType": 0,
              "resourceType": "microsoft.operationalinsights/workspaces",
              "visualization": "card",
              "tileSettings": {
                "showBorder": false
              },
              "graphSettings": {
                "type": 0
              },
              "mapSettings": {
                "locInfo": "LatLong",
                "sizeSettings": "DstPortNumber",
                "sizeAggregation": "Sum",
                "legendMetric": "DstPortNumber",
                "legendAggregation": "Sum",
                "itemColorSettings": {
                  "type": "heatmap",
                  "colorAggregation": "Sum",
                  "nodeColorField": "DstPortNumber",
                  "heatmapPalette": "greenRed"
                }
              },
              "textSettings": {
                "style": "bignumber"
              }
            },
            "name": "query - 14"
          },
          {
            "type": 3,
            "content": {
              "version": "KqlItem/1.0",
              "query": "GWorkspaceActivityReports \r\n| where EventType contains \"ALERT\"\r\n| count\r\n",
              "size": 3,
              "title": "Alerts",
              "timeContext": {
                "durationMs": 7776000000
              },
              "timeContextFromParameter": "TimeRange",
              "queryType": 0,
              "resourceType": "microsoft.operationalinsights/workspaces",
              "visualization": "card",
              "textSettings": {
                "style": "bignumber"
              }
            },
            "name": "query - 12"
          }
        ]
      },
      "customWidth": "15",
      "name": "group - 13"
    },
    {
      "type": 3,
      "content": {
        "version": "KqlItem/1.0",
        "query": "  GWorkspaceActivityReports\r\n  | where isnotempty(EventType) \r\n  | summarize Applications = count() by EventType\r\n  | top 20 by Applications",
        "size": 1,
        "title": "Event types",
        "timeContext": {
          "durationMs": 7776000000
        },
        "timeContextFromParameter": "TimeRange",
        "queryType": 0,
        "resourceType": "microsoft.operationalinsights/workspaces",
        "visualization": "table"
      },
      "customWidth": "33",
      "name": "query - 3",
      "styleSettings": {
        "margin": "10",
        "padding": "10"
      }
    },
    {
      "type": 3,
      "content": {
        "version": "KqlItem/1.0",
        "query": "GWorkspaceActivityReports\r\n  | where isnotempty(LoginType) \r\n  | summarize login = count() by LoginType\r\n  | top 20 by login",
        "size": 3,
        "title": "Login types",
        "queryType": 0,
        "resourceType": "microsoft.operationalinsights/workspaces",
        "visualization": "piechart"
      },
      "customWidth": "30",
      "name": "query - 15",
      "styleSettings": {
        "maxWidth": "30"
      }
    },
    {
      "type": 3,
      "content": {
        "version": "KqlItem/1.0",
        "query": "  GWorkspaceActivityReports\r\n  | where isnotempty(ActorCallerType) \r\n  | summarize UserType = count() by ActorCallerType\r\n  | top 20 by UserType",
        "size": 3,
        "title": "User type",
        "timeContext": {
          "durationMs": 7776000000
        },
        "timeContextFromParameter": "TimeRange",
        "queryType": 0,
        "resourceType": "microsoft.operationalinsights/workspaces",
        "visualization": "piechart"
      },
      "customWidth": "33",
      "name": "query - 9",
      "styleSettings": {
        "maxWidth": "33"
      }
    },
    {
      "type": 3,
      "content": {
        "version": "KqlItem/1.0",
        "query": "  GWorkspaceActivityReports\r\n  | where isnotempty(DocType) \r\n  | summarize DocumentType = count() by DocType\r\n  | top 20 by DocumentType",
        "size": 3,
        "title": "Document types",
        "timeContext": {
          "durationMs": 7776000000
        },
        "timeContextFromParameter": "TimeRange",
        "queryType": 0,
        "resourceType": "microsoft.operationalinsights/workspaces",
        "visualization": "piechart"
      },
      "customWidth": "35",
      "name": "query - 10",
      "styleSettings": {
        "maxWidth": "30"
      }
    },
    {
      "type": 3,
      "content": {
        "version": "KqlItem/1.0",
        "query": "GWorkspaceActivityReports\r\n| where EventType =~ \"login\"\r\n| where isnotempty(LoginType)\r\n| sort by TimeGenerated desc \r\n| project User=ActorEmail, LoginType, Action=case(EventMessage =~ 'login_success', '✅ - Logged in', EventMessage =~ 'login_failure' or IsSuspicious == true, '❌ - Login failed', 'Verification')",
        "size": 0,
        "title": "User Authentication",
        "timeContext": {
          "durationMs": 7776000000
        },
        "timeContextFromParameter": "TimeRange",
        "queryType": 0,
        "resourceType": "microsoft.operationalinsights/workspaces",
        "visualization": "table"
      },
      "customWidth": "50",
      "name": "query - 13",
      "styleSettings": {
        "maxWidth": "50"
      }
    },
    {
      "type": 3,
      "content": {
        "version": "KqlItem/1.0",
        "query": "GWorkspaceActivityReports\r\n| where isnotempty(ActorEmail)\r\n| where isnotempty(EventType)\r\n| where EventMessage != 'change_event'\r\n| sort by TimeGenerated desc \r\n| project User=ActorEmail, SourceAddress=SrcIpAddr, DocumentTitle=DocTitle, Action=EventMessage, IsSecurityEvent=strcat(iff(EventType contains \"alert\", '❌', '✅'))\r\n",
        "size": 0,
        "title": "Document operations",
        "timeContext": {
          "durationMs": 7776000000
        },
        "timeContextFromParameter": "TimeRange",
        "queryType": 0,
        "resourceType": "microsoft.operationalinsights/workspaces",
        "gridSettings": {
          "rowLimit": 100,
          "filter": true
        }
      },
      "name": "query - 12"
    }
  ],
  "fromTemplateId": "sentinel-GoogleWorkspaceWorkbook",
  "$schema": "https://github.com/Microsoft/Application-Insights-Workbooks/blob/master/schema/workbook.json"
}