Skip to content

Commit b6fbd7a

Browse files
committed
Add GraphUserAccount to request context
1 parent ae9bb56 commit b6fbd7a

File tree

3 files changed

+37
-0
lines changed

3 files changed

+37
-0
lines changed

src/Microsoft.Graph.Core/Requests/GraphRequestContext.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,5 +31,10 @@ public class GraphRequestContext
3131
/// A FeatureUsage property
3232
/// </summary>
3333
public FeatureFlag FeatureUsage { get; set; }
34+
35+
/// <summary>
36+
/// A <see cref="GraphUserAccount"/> property representing the logged in user
37+
/// </summary>
38+
public GraphUserAccount User { get; set; }
3439
}
3540
}
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
// ------------------------------------------------------------------------------
2+
// Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
3+
// ------------------------------------------------------------------------------
4+
5+
namespace Microsoft.Graph
6+
{
7+
/// <summary>
8+
/// Class representing the logged in MS graph user
9+
/// </summary>
10+
public class GraphUserAccount
11+
{
12+
/// <summary>
13+
/// The users email address
14+
/// </summary>
15+
public string Email { get; set; }
16+
17+
/// <summary>
18+
/// The identity provider url
19+
/// </summary>
20+
public string Environment { get; set; }
21+
22+
/// <summary>
23+
/// Users tenant id
24+
/// </summary>
25+
public string TenantId { get; set; }
26+
27+
/// <summary>
28+
/// Users id in a tenant
29+
/// </summary>
30+
public string ObjectId { get; set; }
31+
}
32+
}

0 commit comments

Comments
 (0)