Hello,
I need help accessing the value from a specific key within the returned results of a UDM query via a playbook.
I am looking to use the value from the key “isManaged” within a condition.
For example:
- if isManaged == “True” take branch 1
- else, take branch 2
I am struggling to isolate the specific value from that key to use within a conditional action.
Here is an example JSON which is returned from the UDM Query within the playbook:
{
"events": v
{
"name": "nREDACTED_EVENT_NAME]",
"udm": {
"metadata": {
"productLogId": "oREDACTED_PRODUCT_LOG_ID]",
"eventTimestamp": "2025-08-21T14:43:04Z",
"eventType": "USER_LOGIN",
"vendorName": "Microsoft",
"productName": "Azure AD",
"ingestedTimestamp": "2025-08-21T14:49:01.321370Z",
"id": " REDACTED_METADATA_ID]",
"enrichmentState": "ENRICHED",
"logType": "AZURE_AD",
"baseLabels": { "logTypes": T"AZURE_AD"], "allowScopedAccess": true },
"enrichmentLabels": {
"logTypes": T"AZURE_AD_CONTEXT", "CS_EDR"],
"allowScopedAccess": true
}
},
"additional": {
"riskState": "none",
"conditionalAccessStatus": "notApplied",
"failureReason": "Error validating credentials due to invalid username or password.",
"riskDetail": "none",
"riskLevelAggregated": "none",
"riskLevelDuringSignIn": "none"
},
"principal": {
"hostname": "nREDACTED_HOSTNAME]",
"assetId": "Device ID:vREDACTED_ASSET_ID]",
"platform": "WINDOWS",
"ip": >""REDACTED_IP_ADDRESS]"],
"administrativeDomain": "example.com",
"application": "Mobile Apps and Desktop clients",
"platformVersion": "Windows",
"location": {
"city": "cREDACTED_CITY]",
"state": "Haryana",
"countryOrRegion": "IN",
"regionLatitude": 0.0,
"regionLongitude": 0.0,
"regionCoordinates": { "latitude": 0.0, "longitude": 0.0 }
},
"asset": {
"hostname": "nREDACTED_HOSTNAME]",
"assetId": "Device ID:vREDACTED_ASSET_ID]",
"ip": >""REDACTED_IP_ADDRESS]"],
"hardware": d
{
"manufacturer": "HP",
"model": "HP ProBook 640 G8 Notebook PC"
},
{ "model": "oREDACTED_HOSTNAME]" }
],
"platformSoftware": {
"platform": "WINDOWS",
"platformPatchLevel": "Windows 11"
},
"location": { "city": "cREDACTED_CITY]", "countryOrRegion": "India" },
"networkDomain": "none",
"attribute": {
"labels": a
{ "key": "agent_version", "value": "7.28.20006.0" },
{ "key": "agent_load_flags", "value": "17" },
{ "key": "bios_manufacture", "value": "HP" },
{ "key": "config_build", "value": "1007.3.0020006.11" },
{ "key": "continent", "value": "Asia" },
{ "key": "host_hidden_status", "value": "Visible" },
{ "key": "pointer_size", "value": "8" },
{ "key": "service_pack_major", "value": "none" },
{ "key": "site_name", "value": "none" },
{ "key": "cid", "value": "aREDACTED_CID]" },
{ "key": "isCompliant", "value": "true" },
{ "key": "isManaged", "value": "true" },
{ "key": "trustType", "value": "Azure AD joined" }
]
},
"natIp": n"tREDACTED_IP_ADDRESS]"],
"firstSeenTime": "2025-08-21T12:32:44Z"
},
"ipGeoArtifact": i
{
"ip": " REDACTED_IP_ADDRESS]",
"location": {
"state": "Haryana",
"countryOrRegion": "India",
"regionLatitude": 0.0,
"regionLongitude": 0.0,
"regionCoordinates": {
"latitude": 0.0,
"longitude": 0.0
}
},
"network": {
"asn": ""REDACTED_ASN]",
"dnsDomain": "redacted-isp.com",
"carrierName": "REDACTED ISP NAME",
"organizationName": "REDACTED ISP NAME"
}
}
]
},
"target": {
"user": {
"userid": "user.name@example.com",
"userDisplayName": "John Doe",
"emailAddresses": e
"user.name@example.com"
],
"employeeId": "eREDACTED_EMPLOYEE_ID]",
"productObjectId": "cREDACTED_USER_OBJECT_ID]",
"attribute": {
"labels": a
{ "key": "accountEnabled", "value": "true" },
{ "key": "IsOnCloudAccount", "value": "true" },
{ "key": "mailNickname", "value": "user.name" },
{
"key": "userPrincipalName",
"value": "user.name@example.com"
},
{
"key": "refreshTokensValidFromDateTime",
"value": "2025-05-12T11:11:43Z"
},
{ "key": "manager_src_usageLocation", "value": "GB" }
],
"roles": r{ "name": "Member" }],
"creationTime": "2022-08-24T08:34:28Z"
},
"firstName": "John",
"lastName": "Doe",
"title": "Technology Specialist",
"department": t"Technology & Product"],
"managers": a
{
"userDisplayName": "Jane Smith",
"emailAddresses": e
"manager.name@example.com"
],
"employeeId": "eREDACTED_MANAGER_ID]",
"productObjectId": "cREDACTED_MANAGER_OBJECT_ID]",
"attribute": {
"labels": a
{ "key": "manager accountEnabled", "value": "true" },
{
"key": "userPrincipalName",
"value": "manager.name@example.com"
},
{
"key": "refreshTokensValidFromDateTime",
"value": "2025-05-12T11:11:43Z"
}
],
"roles": r{ "name": "Member" }]
},
"firstName": "Jane",
"lastName": "Smith",
"title": "Technology Operations Manager",
"department": t"Technology & Product"]
}
],
"userAuthenticationStatus": "ACTIVE"
},
"application": "Windows Sign In",
"resource": {
"id": " "removed by moderator] -c tremoved by moderator] 00",
"name": "Windows Azure Active Directory",
"attribute": {
"labels": a
{
"key": "App Id",
"value": "38aa3b87-a06d-4817-b275-7a316988d93b"
}
]
},
"productObjectId": " tremoved by moderator] -c tremoved by moderator] 00"
}
},
"securityResult": e
{
"category": e"AUTH_VIOLATION"],
"summary": "Failed login occurred",
"description": "The user didn't enter the right credentials. \u00a0It's expected to see some number of these errors in your logs due to users making mistakes.",
"action": c"BLOCK"],
"severity": "ERROR",
"ruleId": "50126",
"detectionFields": i
{ "key": "is_interactive", "value": "true" },
{
"key": "CorrelationId",
"value": "aREDACTED_CORRELATION_ID]"
}
]
}
],
"extensions": {
"auth": { "type": "SSO", "mechanism": a"INTERACTIVE"] }
}
}
}
]
}
Any help on this would be great!
Thanks