if (FALSE) {
# Get a token for Azure Resource Manager
token <- az_cli_get_token(
scope = "https://management.azure.com/.default"
)
# Get a token for a specific tenant
token <- az_cli_get_token(
scope = "https://graph.microsoft.com/.default",
tenant_id = "your-tenant-id"
)
# Access the token string
access_token <- token$access_token
}
Run the code above in your browser using DataLab