Microsoft Sentinel Analytic Rules
cloudbrothers.infoAzure Sentinel RepoToggle Dark/Light/Auto modeToggle Dark/Light/Auto modeToggle Dark/Light/Auto modeBack to homepage

Service principal not using client credentials

Back
IdD308318A-B298-4E57-82BD-74AE33C4A539
RulenameService principal not using client credentials
DescriptionThis query searches for an service principal is not using a client certificate or secret is not secure.

It is recommended that you review your needs and use an Authentication method for sign-in.
SeverityHigh
TacticsInitialAccess
TechniquesT1078
Required data connectorsSenservaPro
KindScheduled
Query frequency6h
Query period6h
Trigger threshold0
Trigger operatorgt
Source Urihttps://github.com/Azure/Azure-Sentinel/blob/master/Solutions/SenservaPro/Analytic Rules/NotUsingClientCredentials.yaml
Version1.0.1
Arm templateD308318A-B298-4E57-82BD-74AE33C4A539.json
Deploy To Azure
SenservaPro_CL
| where ControlName_s == 'ServicePrincipalNotUsingClientCredentials'
relevantTechniques:
- T1078
name: Service principal not using client credentials
requiredDataConnectors:
- dataTypes:
  - SenservaPro_CL
  connectorId: SenservaPro
entityMappings:
- fieldMappings:
  - identifier: Name
    columnName: ControlName_s
  - identifier: AadTenantId
    columnName: TenantId
  - identifier: DisplayName
    columnName: TenantDisplayName_s
  entityType: Account
- fieldMappings:
  - identifier: DistinguishedName
    columnName: Group_s
  entityType: SecurityGroup
- fieldMappings:
  - identifier: ResourceId
    columnName: SourceSystem
  entityType: AzureResource
triggerThreshold: 0
id: D308318A-B298-4E57-82BD-74AE33C4A539
tactics:
- InitialAccess
version: 1.0.1
OriginalUri: https://github.com/Azure/Azure-Sentinel/blob/master/Solutions/SenservaPro/Analytic Rules/NotUsingClientCredentials.yaml
queryPeriod: 6h
kind: Scheduled
queryFrequency: 6h
severity: High
status: Available
description: |
  'This query searches for an service principal is not using a client certificate or secret is not secure. 
   It is recommended that you review your needs and use an Authentication method for sign-in.'  
query: |
  SenservaPro_CL
  | where ControlName_s == 'ServicePrincipalNotUsingClientCredentials'  
triggerOperator: gt
{
  "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
  "contentVersion": "1.0.0.0",
  "parameters": {
    "workspace": {
      "type": "String"
    }
  },
  "resources": [
    {
      "apiVersion": "2024-01-01-preview",
      "id": "[concat(resourceId('Microsoft.OperationalInsights/workspaces/providers', parameters('workspace'), 'Microsoft.SecurityInsights'),'/alertRules/D308318A-B298-4E57-82BD-74AE33C4A539')]",
      "kind": "Scheduled",
      "name": "[concat(parameters('workspace'),'/Microsoft.SecurityInsights/D308318A-B298-4E57-82BD-74AE33C4A539')]",
      "properties": {
        "alertRuleTemplateName": "D308318A-B298-4E57-82BD-74AE33C4A539",
        "customDetails": null,
        "description": "'This query searches for an service principal is not using a client certificate or secret is not secure. \n It is recommended that you review your needs and use an Authentication method for sign-in.'\n",
        "displayName": "Service principal not using client credentials",
        "enabled": true,
        "entityMappings": [
          {
            "entityType": "Account",
            "fieldMappings": [
              {
                "columnName": "ControlName_s",
                "identifier": "Name"
              },
              {
                "columnName": "TenantId",
                "identifier": "AadTenantId"
              },
              {
                "columnName": "TenantDisplayName_s",
                "identifier": "DisplayName"
              }
            ]
          },
          {
            "entityType": "SecurityGroup",
            "fieldMappings": [
              {
                "columnName": "Group_s",
                "identifier": "DistinguishedName"
              }
            ]
          },
          {
            "entityType": "AzureResource",
            "fieldMappings": [
              {
                "columnName": "SourceSystem",
                "identifier": "ResourceId"
              }
            ]
          }
        ],
        "OriginalUri": "https://github.com/Azure/Azure-Sentinel/blob/master/Solutions/SenservaPro/Analytic Rules/NotUsingClientCredentials.yaml",
        "query": "SenservaPro_CL\n| where ControlName_s == 'ServicePrincipalNotUsingClientCredentials'\n",
        "queryFrequency": "PT6H",
        "queryPeriod": "PT6H",
        "severity": "High",
        "status": "Available",
        "subTechniques": [],
        "suppressionDuration": "PT1H",
        "suppressionEnabled": false,
        "tactics": [
          "InitialAccess"
        ],
        "techniques": [
          "T1078"
        ],
        "templateVersion": "1.0.1",
        "triggerOperator": "GreaterThan",
        "triggerThreshold": 0
      },
      "type": "Microsoft.OperationalInsights/workspaces/providers/alertRules"
    }
  ]
}