Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
SilverdewBaker committed Dec 25, 2022
1 parent fa98f18 commit 2344410
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions kusto/kcsb.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@ package kusto

import (
"fmt"
"strconv"
"strings"

kustoErrors "github.com/Azure/azure-kusto-go/kusto/data/errors"
"github.com/Azure/azure-sdk-for-go/sdk/azcore"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"strconv"
"strings"
)

type ConnectionStringBuilder struct {
Expand Down Expand Up @@ -356,7 +357,7 @@ func (kcsb *ConnectionStringBuilder) newTokenProvider() (*TokenProvider, error)
return cred, nil
}
case kcsb.MsiAuthentication:
{
init = func(ci *CloudInfo, cliOpts *azcore.ClientOptions, appClientId string) (azcore.TokenCredential, error) {
opts := &azidentity.ManagedIdentityCredentialOptions{}
if kcsb.ClientOptions != nil {
opts.ClientOptions = *kcsb.ClientOptions
Expand All @@ -370,6 +371,8 @@ func (kcsb *ConnectionStringBuilder) newTokenProvider() (*TokenProvider, error)
return nil, fmt.Errorf("error: Couldn't retrieve client credentials using Managed Identity: %s", err)
}
tkp.tokenCred = cred

return cred, nil
}
case !isEmpty(kcsb.UserToken):
{
Expand Down

0 comments on commit 2344410

Please sign in to comment.