Skip to content

Inconsistent connection behaviour between regular Python and IPyNB #188

@lesleyxyz

Description

@lesleyxyz

I have received a tenant_id, client_id, client_scret, workspace_id and workspace_name.

When I use Kqlmagic to connect like the following:

%kql loganalytics://tenant='tenant_id';clientid='client_id';clientsecret='client_secret';workspace='workspace_id';alias='workspace_name'

It works perfectly.

But when I use msticpy to connect using the following:

qry_prov = QueryProvider(data_environment='LogAnalytics')
qry_prov.connect(connection_str="loganalytics://tenant='tenant_id';clientid='client_id';clientsecret='client_secret';workspace='workspace_id';alias='workspace_name'")

It fails to connect.
I am assuming it is because using this data environment I can only supply a tenant_id and workspace_id.

When I try

qry_prov = QueryProvider('MDATP')
qry_prov.connect(tenant_id=tenant_id, client_id=client_id, client_secret=client_secret)

It connects succesfully, but then I can only access qry_prov.MDATP.* and not the qry_prov.SecurityAlert.list_alerts() that I require.

Metadata

Metadata

Assignees

No one assigned

    Labels

    acceptedThe request/issue is accepted for a fixenhancementNew feature or requestquestionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions