Skip to content

Commit 7821576

Browse files
committed
update file
1 parent e7a8667 commit 7821576

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

support/entra/entra-id/users-groups-entra-apis/call-graph-api-using-managed-dentities.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -69,13 +69,11 @@ foreach($permission in $Permissions)
6969
```
7070
## Get access token
7171

72-
Once your permissions are on the service principal, make a token request from the resource: `https://graph.microsoft.com`.
72+
After the permissions are configured in the service principal, make a token request from the resource: `https://graph.microsoft.com`:
7373

7474
> [!NOTE]
7575
> Once you make a token request for a resource, you'll get the same token for the next 24 hours, even if you make permission changes. you'll need to wait for the current token to expire in order to get a token with any new permissions.
7676
77-
Once you have your permissions, it's a matter of changing the resource parameter in the code for the access token request such as the following:
78-
7977
```vbnet
8078
Dim at As AccessToken = credential.GetToken(New TokenRequestContext(New String() {"https://graph.microsoft.com"}))
8179
```
@@ -87,6 +85,7 @@ AccessToken at = credential.GetToken(new TokenRequestContext(new string[] { "htt
8785
## Call Graph APIs
8886
This example shows how to request an access token for a resource such as Microsoft Graph. When you use the Microsoft Graph service client in your code, you don't need to specify the resource explicitly, as the Microsoft Graph service client handles that automatically. In VB.Net, you'll need to add the `Microsoft.Graph` NuGet package and then add the `Imports Microsoft.Graph` at the top of the code file.
8987

88+
### VB.Net
9089
```vbnet
9190

9291

@@ -168,7 +167,9 @@ This example shows how to request an access token for a resource such as Microso
168167

169168

170169
End Sub
171-
Similar, the missing code snippets for the C# project:
170+
```
171+
172+
### C#
172173

173174
```csharp
174175
static void Main(string[] args)

0 commit comments

Comments
 (0)