Skip to content

ccmsft/sentinel-scripts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Sentinel Scripts

A place for simple scripts!

Using the Azure SDK for Python

🔗 https://azure.github.io/azure-sdk/releases/latest/all/python.html

Sentinel SDK

We use the azure-mgmt-securityinsight package to authenticate.

Authentication and API Instantiation

🔗 https://docs.microsoft.com/en-us/azure/developer/python/sdk/authentication-overview

We use the azure-identity package to authenticate.

pip install azure-identity

The simplest way to get an authentication token involves using DefaultAzureCredential which grabs a valid token from your environment. See the link for details.

It can be used as follows:

from azure.identity import DefaultAzureCredential
from azure.mgmt.securityinsight import SecurityInsights

subscription_id = "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa"

# Acquire a credential object
credential = DefaultAzureCredential()


# Authenticate to an API provider (e.g. Sentinel)
sentinel = SecurityInsights(credential, subscription_id)

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages