Manage AAD authentication tokens for Kusto clusters
Manage AAD authentication tokens for Kusto clusters
get_kusto_token( server =NULL, clustername, location =NULL, tenant =NULL, app = .kusto_app_id, auth_type =NULL, version =2,...)delete_kusto_token( server =NULL, clustername, location =NULL, tenant =NULL, app = .kusto_app_id, auth_type =NULL, version =2,..., hash =NULL, confirm =TRUE)list_kusto_tokens()
Arguments
server: The URI of your Kusto cluster. If not supplied, it is obtained from the clustername and location arguments.
clustername: The cluster name.
location: The cluster location. Leave this blank for a Microsoft-internal Kusto cluster like "help".
tenant: Your Azure Active Directory (AAD) tenant. Can be a GUID, a name ("myaadtenant") or a fully qualified domain name ("myaadtenant.com").
app: The ID of the Azure Active Directory app/service principal to authenticate with. Defaults to the ID of the KustoClient app.
auth_type: The authentication method to use. Can be one of "authorization_code", "device_code", "client_credentials" or "resource_owner". The default is to pick one based on the other arguments.
version: The AAD version to use. There should be no reason to change this from the default value of 2.
...: Other arguments to pass to AzureAuth::get_azure_token .
hash: For delete_kusto_token, the MD5 hash of the token. This is used to identify the token if provided.
confirm: For delete_kusto_token, whether to ask for confirmation before deleting the token.
Returns
get_kusto_token returns an object of class AzureAuth::AzureToken representing the authentication token, while list_kusto_tokens returns a list of such objects. delete_azure_token returns NULL on a successful delete.
Details
get_kusto_token returns an authentication token for the given cluster, caching its value on disk. delete_kusto_token deletes a cached token, and list_kusto_tokens lists all cached tokens.
By default, authentication tokens will be obtained using the main KustoClient Active Directory app. This app can be used to authenticate with any Kusto cluster (assuming, of course, you have the proper credentials).
Examples
## Not run:get_kusto_token("https://myclust.australiaeast.kusto.windows.net")get_kusto_token(clustername="myclust", location="australiaeast")# authenticate using client_credentials method: see ?AzureAuth::get_azure_tokenget_kusto_token("https://myclust.australiaeast.kusto.windows.net", tenant="mytenant", app="myapp", password="password")## End(Not run)