def rule(event):
    if all(
        [
            event.deep_get("CategoryValue", default="") == "Administrative",
            event.deep_get("ResourceProviderValue", default="")
            == "Microsoft.ADHybridHealthService",
            "AdFederationService" in event.deep_get("ResourceId", default=""),
            event.deep_get("OperationNameValue", default="")
            == "Microsoft.ADHybridHealthService/services/servicemembers/action",
        ]
    ):
        return True
    return False
