Home > database >  How to get Azure AD JWT in GO
How to get Azure AD JWT in GO

Time:02-24

So I'm testing the waters with Go. I need to manually make a REST call to an Azure AD protected endpoint. I'm using the Azure Identity package, but still I am not able to get the token.

package main

import (
    "context"
    "fmt"

    azi "github.com/Azure/azure-sdk-for-go/sdk/azidentity"
)

func main() {

    cred, err := azi.NewInteractiveBrowserCredential(nil)
    if err != nil {
        fmt.Println(err.Error())
        return
    }

    fmt.Println("No error            
  • Related