Skip to content

Commit 0ab1114

Browse files
DOC-4990 added extra example suggested in feedback
1 parent 9d9e46f commit 0ab1114

File tree

1 file changed

+17
-1
lines changed
  • content/develop/clients/go

1 file changed

+17
-1
lines changed

content/develop/clients/go/amr.md

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,23 @@ options := entraid.CredentialsProviderOptions{
152152
}
153153
```
154154

155-
These options are explained below:
155+
You can then pass this configuration when you create the
156+
`StreamingCredentialsProvider`. The example below shows how to do this
157+
with the `NewManagedIdentityCredentialsProvider()` method:
158+
159+
```go
160+
provider, err := entraid.NewManagedIdentityCredentialsProvider(
161+
entraid.ManagedIdentityCredentialsProviderOptions{
162+
CredentialsProviderOptions: options,
163+
ManagedIdentityProviderOptions: identity.ManagedIdentityProviderOptions{
164+
ManagedIdentityType: identity.UserAssignedObjectID,
165+
UserAssignedObjectID: "<your-user-assigned-client-id>",
166+
},
167+
},
168+
)
169+
```
170+
171+
The fields of `TokenManagerOptions` are explained below:
156172

157173
- `ExpirationRefreshRatio`: A `float` value representing the fraction
158174
of a token's lifetime that should elapse before attempting to

0 commit comments

Comments
 (0)