Skip to content

Commit

Permalink
Merge pull request #6 from microsoftgraph/bugfix/device-code-update
Browse files Browse the repository at this point in the history
- updates readme to match az identity updates
  • Loading branch information
baywet authored Nov 4, 2021
2 parents 3621980 + 130564a commit c2e70c6
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,17 @@ For an example of how to get an authentication provider, see [choose a Microsoft
```Golang
import (
azidentity "https://github.com/Azure/azure-sdk-for-go/sdk/azidentity"
a "https://github.com/microsoft/kiota/authentication/go/azure"
azidentity "github.com/Azure/azure-sdk-for-go/sdk/azidentity"
a "github.com/microsoft/kiota/authentication/go/azure"
"context"
)

cred, err := azidentity.NewDeviceCodeCredential(&azidentity.DeviceCodeCredentialOptions{
TenantID: "<the tenant id from your app registration>",
ClientID: "<the client id from your app registration>",
UserPrompt: func(message azidentity.DeviceCodeMessage) {
UserPrompt: func(ctx context.Context, message azidentity.DeviceCodeMessage) error {
fmt.Println(message.Message)
return nil
},
})

Expand All @@ -59,7 +61,7 @@ if err != nil {
You must get a **GraphRequestAdapter** object to make requests against the service.

```Golang
import msgraphsdk "https://github.com/microsoftgraph/msgraph-sdk-go"
import msgraphsdk "github.com/microsoftgraph/msgraph-sdk-go"

adapter, err := msgraphsdk.NewGraphRequestAdapter(auth)
if err != nil {
Expand Down

0 comments on commit c2e70c6

Please sign in to comment.