Skip to content

Commit

Permalink
fix azure ad
Browse files Browse the repository at this point in the history
  • Loading branch information
renanaAkeyless committed Jul 5, 2021
1 parent 319b6f0 commit c394960
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion cloudprovider/azure/cloud_id.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package azure

import (
"encoding/base64"
"encoding/json"
"fmt"
"io/ioutil"
Expand Down Expand Up @@ -68,7 +69,8 @@ func GetCloudId(objectId string) (string, error) {
if err != nil {
return "", fmt.Errorf("failed to unmarshal azure-ad identity metadata response. Error: %v %v", err, string(body))
}
return identity.AccessToken, nil
cloudId := base64.StdEncoding.EncodeToString([]byte(identity.AccessToken))
return cloudId, nil
}

return "", fmt.Errorf(errMsg)
Expand Down

0 comments on commit c394960

Please sign in to comment.