Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Start trying to remove graph api sdk dependency #1003

Open
wants to merge 76 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 62 commits
Commits
Show all changes
76 commits
Select commit Hold shift + click to select a range
2fbaeb4
Switch caught exception usage
quails4Eva Apr 1, 2024
9626e86
Replace graph api sdk usage with http client usage
quails4Eva Apr 1, 2024
d3867f1
Update version of System.Text.Json used
quails4Eva May 15, 2024
22297cc
Replace Newtonsoft.Json with system.text.json
quails4Eva May 15, 2024
280db1d
Update Microsoft.Bcl.AsyncInterfaces
quails4Eva May 15, 2024
5c1b2ff
Re-use existing item group
quails4Eva May 15, 2024
c0098e4
Replace some graph api exception usage
quails4Eva May 15, 2024
6c45fdf
Add async version of MakeHttpRequest
quails4Eva May 15, 2024
c137c80
Replace a delete group usage
quails4Eva May 15, 2024
014dd41
Throw more specific exception when http error
quails4Eva May 15, 2024
68c6983
Replace delete call
quails4Eva May 15, 2024
c7f922f
CreateSubscription to use http client
quails4Eva May 27, 2024
d6a3e24
Update patch
quails4Eva May 27, 2024
5e8d822
Update delete
quails4Eva May 27, 2024
32e7b28
Update ListSubscriptions
quails4Eva May 27, 2024
f2cc5f7
Implement range selection
quails4Eva May 27, 2024
6c7acc9
Remove unused async -> sync
quails4Eva May 27, 2024
e30cd74
Add todo
quails4Eva May 27, 2024
d8d503c
Replace graph api usage
quails4Eva Jun 1, 2024
1484fbc
fix build issue
quails4Eva Jun 1, 2024
4cffde9
Fix build issue
quails4Eva Jun 1, 2024
8d979cf
.
quails4Eva Jun 1, 2024
a1b75ba
Remove some graph api usage
quails4Eva Jun 1, 2024
62fbf58
Remove graph api usage from Delete Group
quails4Eva Jun 1, 2024
4a1baaa
Remove unused code
quails4Eva Jun 1, 2024
cd6f09d
Maintain stack info
quails4Eva Jun 1, 2024
f9e6df3
Fix exception type
quails4Eva Jun 1, 2024
3a6104e
Update InviteGuestUser to not use graph nuget
quails4Eva Jun 1, 2024
f174b41
Remove unused task.run
quails4Eva Jun 1, 2024
e50af31
Tidy exception handling
quails4Eva Jun 8, 2024
a35d919
Replace graph api usage
quails4Eva Jun 8, 2024
54f6f4b
Rename group
quails4Eva Jul 20, 2024
321fc21
Update GetUnifiedGroup to not use grapn api sdk
quails4Eva Jul 20, 2024
2ea945c
Replace GetGroups graph api sdk usage
quails4Eva Jul 20, 2024
b03a32a
Replace Graph SDK in Create Group
quails4Eva Sep 29, 2024
476a0b8
Fix exception handling
quails4Eva Sep 29, 2024
5ce9af3
Don't use Graph SDK for RemoveGroupMembers
quails4Eva Sep 29, 2024
e2b4910
Remove unused code
quails4Eva Sep 29, 2024
e4aaf0a
Remove Graph SDK from RemoveGroupOwners
quails4Eva Sep 29, 2024
8b3e3ef
change naming
quails4Eva Sep 29, 2024
05403d5
Fix UpdateGroup setup
quails4Eva Sep 29, 2024
ad6ef23
Start updating UpdateMembers to use less Graph SDK
quails4Eva Sep 29, 2024
2435d06
Reduce Graph SDK use in UpdateOwners
quails4Eva Sep 29, 2024
a634d10
Remove direct use of Graph SDK from UpdateGroup
quails4Eva Sep 29, 2024
e95beaa
Replace direct Graph SDK usage in UpdateGroup
quails4Eva Sep 29, 2024
4b0fd00
Add helper method for reading paged data
quails4Eva Nov 17, 2024
769b909
Iterate paged owners and members without graph api sdk
quails4Eva Nov 17, 2024
62939e2
Remove unused ref to graph client and update exception type
quails4Eva Nov 17, 2024
12e30fe
Remaining GroupsUtility code to not use Graph SDK, allow custom deser…
quails4Eva Nov 17, 2024
301d6e7
Tidy async and tasks
quails4Eva Nov 17, 2024
ffc0d5e
Remove unused consts
quails4Eva Nov 17, 2024
cf619ed
Copy some methods from GroupsUtility to UnifiedGroupsUtility
quails4Eva Nov 17, 2024
25783a5
Copy some code from Group to UnifiedGroup utility
quails4Eva Nov 17, 2024
29bfccb
Get user ids without graph api sdk
quails4Eva Nov 23, 2024
2994cb9
Convert UpdateUnifiedGroup to not use Graph Api SDK
quails4Eva Nov 23, 2024
60293ae
Add missing content type
quails4Eva Nov 23, 2024
c2dcfcc
Use const for json content type
quails4Eva Nov 23, 2024
ac75bbd
Update Renew to not use Graph Api SDK
quails4Eva Nov 23, 2024
cac4566
Update CreateUnifiedGroup to not use Graph Api SDK
quails4Eva Nov 23, 2024
f373293
ListUnifiedGroups to not use Graph Api SDK
quails4Eva Nov 23, 2024
bb97d36
GetUnifiedGroups to not use Graph Api SDK
quails4Eva Nov 23, 2024
7ed9e96
GetUnifiedGroupMembers to not us MS Graph SDK
quails4Eva Dec 7, 2024
af15c73
Same for owners
quails4Eva Dec 7, 2024
6f99942
Remove unused code
quails4Eva Dec 7, 2024
ebbae7a
Update GetNestedUnifiedGroupMembers
quails4Eva Dec 7, 2024
6099479
Remove unused code
quails4Eva Dec 7, 2024
3cdc1a1
ListUsers to not use MS Graph Api SDK
quails4Eva Dec 7, 2024
6df9841
Fix start and end index
quails4Eva Dec 7, 2024
5355b6f
Replace use of MS Graph Api SDK
quails4Eva Dec 7, 2024
6a3d2e9
Remove PnPHttpProvider
quails4Eva Dec 7, 2024
b0ceb5c
Re-use json options
quails4Eva Dec 7, 2024
2372b67
Merge
quails4Eva Dec 7, 2024
a5d6613
Remove extra package added
quails4Eva Dec 7, 2024
81db6cc
Remove Microsoft.Graph package
quails4Eva Jan 11, 2025
47a75b0
Minor updates
quails4Eva Jan 11, 2025
281de1f
Remove Microsoft.Graph.Core
quails4Eva Jan 11, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 49 additions & 0 deletions src/lib/PnP.Framework.Test/Graph/UnifiedGroupsUtilityTests.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Text.Json;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using PnP.Framework.Entities;
using PnP.Framework.Graph;

namespace PnP.Framework.Test.Graph
{
[TestClass]
public class UnifiedGroupsUtilityTests
{
[TestMethod]
public void GetUnifiedGroupMembers_WhenCalled_ShouldReturnData()
{
// Arrange
TestCommon.RegisterPnPHttpClientMock();
//var fakeHandler = new MockHttpHandler("");

// Act
var results = UnifiedGroupsUtility.GetUnifiedGroupMembers(
new UnifiedGroupEntity() { GroupId = "abc", },
"testt"
);

// Assert
Assert.IsNotNull(results);
Assert.IsTrue(results.Count > 1);

AssertAllPropertiesHaveBeenAssigned(results);

var output = JsonSerializer.Serialize(results);
}

private static void AssertAllPropertiesHaveBeenAssigned<T>(List<T> results)
{
foreach (PropertyInfo pi in typeof(T).GetProperties())
{
Assert.IsTrue(
results.Any(r =>
pi.GetValue(r, null) != (pi.PropertyType.IsValueType ? Activator.CreateInstance(pi.PropertyType) : null)
)
);
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[
{
"Url": "https://graph.microsoft.com/v1.0/groups/abc/members/microsoft.graph.user",
"Body": "",
"Content": "{\r\n \"@odata.context\": \"https:\/\/graph.microsoft.com\/v1.0\/$metadata#directoryObjects\",\r\n \"value\": [\r\n {\r\n \"@odata.type\": \"#microsoft.graph.user\",\r\n \"id\": \"87d349ed-44d7-43e1-9a83-5f2406dee5bd\",\r\n \"businessPhones\": [\r\n \"+1 425 555 0109\"\r\n ],\r\n \"displayName\": \"Adele Vance\",\r\n \"givenName\": \"Adele\",\r\n \"jobTitle\": \"Product Marketing Manager\",\r\n \"mail\": \"[email protected]\",\r\n \"mobilePhone\": \"1234\",\r\n \"officeLocation\": \"18\/2111\",\r\n \"preferredLanguage\": \"en-US\",\r\n \"surname\": \"Vance\",\r\n \"userPrincipalName\": \"[email protected]\"\r\n },\r\n {\r\n \"@odata.type\": \"#microsoft.graph.user\",\r\n \"id\": \"626cbf8c-5dde-46b0-8385-9e40d64736fe\",\r\n \"businessPhones\": [\r\n \"+1 502 555 0102\"\r\n ],\r\n \"displayName\": \"Johanna Lorenz\",\r\n \"givenName\": \"Johanna\",\r\n \"jobTitle\": \"CVP Engineering\",\r\n \"mail\": \"[email protected]\",\r\n \"mobilePhone\": null,\r\n \"officeLocation\": \"23\/2102\",\r\n \"preferredLanguage\": \"en-US\",\r\n \"surname\": \"Lorenz\",\r\n \"userPrincipalName\": \"[email protected]\"\r\n },\r\n {\r\n \"@odata.type\": \"#microsoft.graph.user\",\r\n \"id\": \"40079818-3808-4585-903b-02605f061225\",\r\n \"businessPhones\": [\r\n \"+1 502 555 0144\"\r\n ],\r\n \"displayName\": \"Patti Fernandez\",\r\n \"givenName\": \"Patti\",\r\n \"jobTitle\": \"President\",\r\n \"mail\": \"[email protected]\",\r\n \"mobilePhone\": null,\r\n \"officeLocation\": \"15\/1102\",\r\n \"preferredLanguage\": \"en-US\",\r\n \"surname\": \"Fernandez\",\r\n \"userPrincipalName\": \"[email protected]\"\r\n },\r\n {\r\n \"@odata.type\": \"#microsoft.graph.user\",\r\n \"id\": \"074e56ea-0b50-4461-89e5-c67ae14a2c0b\",\r\n \"businessPhones\": [\r\n \"+1 913 555 0101\"\r\n ],\r\n \"displayName\": \"Lee Gu\",\r\n \"givenName\": \"Lee\",\r\n \"jobTitle\": \"CVP Research & Development\",\r\n \"mail\": \"[email protected]\",\r\n \"mobilePhone\": null,\r\n \"officeLocation\": \"23\/3101\",\r\n \"preferredLanguage\": \"en-US\",\r\n \"surname\": \"Gu\",\r\n \"userPrincipalName\": \"[email protected]\"\r\n },\r\n {\r\n \"@odata.type\": \"#microsoft.graph.user\",\r\n \"id\": \"16cfe710-1625-4806-9990-91b8f0afee35\",\r\n \"businessPhones\": [\r\n \"+1 205 555 0103\"\r\n ],\r\n \"displayName\": \"Enrico Cattaneo\",\r\n \"givenName\": \"Enrico\",\r\n \"jobTitle\": \"Attorney\",\r\n \"mail\": \"[email protected]\",\r\n \"mobilePhone\": null,\r\n \"officeLocation\": \"14\/1102\",\r\n \"preferredLanguage\": \"en-US\",\r\n \"surname\": \"Cattaneo\",\r\n \"userPrincipalName\": \"[email protected]\"\r\n },\r\n {\r\n \"@odata.type\": \"#microsoft.graph.user\",\r\n \"id\": \"089a6bb8-e8cb-492c-aa41-c078aa0b5120\",\r\n \"businessPhones\": [\r\n \"+1 206 555 0105\"\r\n ],\r\n \"displayName\": \"Nestor Wilke\",\r\n \"givenName\": \"Nestor\",\r\n \"jobTitle\": \"CVP Operations\",\r\n \"mail\": \"[email protected]\",\r\n \"mobilePhone\": null,\r\n \"officeLocation\": \"36\/2121\",\r\n \"preferredLanguage\": \"en-US\",\r\n \"surname\": \"Wilke\",\r\n \"userPrincipalName\": \"[email protected]\"\r\n },\r\n {\r\n \"@odata.type\": \"#microsoft.graph.user\",\r\n \"id\": \"2804bc07-1e1f-4938-9085-ce6d756a32d2\",\r\n \"businessPhones\": [\r\n \"+81 345550115\"\r\n ],\r\n \"displayName\": \"Emily Braun\",\r\n \"givenName\": \"Emily\",\r\n \"jobTitle\": \"Budget Analyst\",\r\n \"mail\": \"[email protected]\",\r\n \"mobilePhone\": null,\r\n \"officeLocation\": \"97\/2302\",\r\n \"preferredLanguage\": \"en-US\",\r\n \"surname\": \"Braun\",\r\n \"userPrincipalName\": \"[email protected]\"\r\n },\r\n {\r\n \"@odata.type\": \"#microsoft.graph.user\",\r\n \"id\": \"b66ecf79-a093-4d51-86e0-efcc4531f37a\",\r\n \"businessPhones\": [\r\n \"+1 858 555 0111\"\r\n ],\r\n \"displayName\": \"Christie Cline\",\r\n \"givenName\": \"Christie\",\r\n \"jobTitle\": \"Sr. VP Sales & Marketing\",\r\n \"mail\": \"[email protected]\",\r\n \"mobilePhone\": null,\r\n \"officeLocation\": \"131\/2105\",\r\n \"preferredLanguage\": \"en-US\",\r\n \"surname\": \"Cline\",\r\n \"userPrincipalName\": \"[email protected]\"\r\n },\r\n {\r\n \"@odata.type\": \"#microsoft.graph.user\",\r\n \"id\": \"8b209ac8-08ff-4ef1-896d-3b9fde0bbf04\",\r\n \"businessPhones\": [\r\n \"+1 980 555 0101\"\r\n ],\r\n \"displayName\": \"Joni Sherman\",\r\n \"givenName\": \"Joni\",\r\n \"jobTitle\": \"Paralegal\",\r\n \"mail\": \"[email protected]\",\r\n \"mobilePhone\": null,\r\n \"officeLocation\": \"20\/1109\",\r\n \"preferredLanguage\": \"en-US\",\r\n \"surname\": \"Sherman\",\r\n \"userPrincipalName\": \"[email protected]\"\r\n },\r\n {\r\n \"@odata.type\": \"#microsoft.graph.user\",\r\n \"id\": \"4782e723-f4f4-4af3-a76e-25e3bab0d896\",\r\n \"businessPhones\": [\r\n \"+1 858 555 0110\"\r\n ],\r\n \"displayName\": \"Alex Wilber\",\r\n \"givenName\": \"Alex\",\r\n \"jobTitle\": \"Marketing Assistant\",\r\n \"mail\": \"[email protected]\",\r\n \"mobilePhone\": null,\r\n \"officeLocation\": \"131\/1104\",\r\n \"preferredLanguage\": \"en-US\",\r\n \"surname\": \"Wilber\",\r\n \"userPrincipalName\": \"[email protected]\"\r\n },\r\n {\r\n \"@odata.type\": \"#microsoft.graph.user\",\r\n \"id\": \"08fa38e4-cbfa-4488-94ed-c834da6539df\",\r\n \"businessPhones\": [\r\n \"+1 858 555 0109\"\r\n ],\r\n \"displayName\": \"Miriam Graham\",\r\n \"givenName\": \"Miriam\",\r\n \"jobTitle\": \"VP Marketing\",\r\n \"mail\": \"[email protected]\",\r\n \"mobilePhone\": null,\r\n \"officeLocation\": \"131\/2103\",\r\n \"preferredLanguage\": \"en-US\",\r\n \"surname\": \"Graham\",\r\n \"userPrincipalName\": \"[email protected]\"\r\n },\r\n {\r\n \"@odata.type\": \"#microsoft.graph.user\",\r\n \"id\": \"24fcbca3-c3e2-48bf-9ffc-c7f81b81483d\",\r\n \"businessPhones\": [\r\n \"+1 205 555 0108\"\r\n ],\r\n \"displayName\": \"Diego Siciliani\",\r\n \"givenName\": \"Diego\",\r\n \"jobTitle\": \"CVP Finance\",\r\n \"mail\": \"[email protected]\",\r\n \"mobilePhone\": null,\r\n \"officeLocation\": \"14\/1108\",\r\n \"preferredLanguage\": \"en-US\",\r\n \"surname\": \"Siciliani\",\r\n \"userPrincipalName\": \"[email protected]\"\r\n },\r\n {\r\n \"@odata.type\": \"#microsoft.graph.user\",\r\n \"id\": \"2ed03dfd-01d8-4005-a9ef-fa8ee546dc6c\",\r\n \"businessPhones\": [\r\n \"+1 918 555 0107\"\r\n ],\r\n \"displayName\": \"Lidia Holloway\",\r\n \"givenName\": \"Lidia\",\r\n \"jobTitle\": \"Product Manager\",\r\n \"mail\": \"[email protected]\",\r\n \"mobilePhone\": null,\r\n \"officeLocation\": \"20\/2107\",\r\n \"preferredLanguage\": \"en-US\",\r\n \"surname\": \"Holloway\",\r\n \"userPrincipalName\": \"[email protected]\"\r\n },\r\n {\r\n \"@odata.type\": \"#microsoft.graph.user\",\r\n \"id\": \"df043ff1-49d5-414e-86a4-0c7f239c36cf\",\r\n \"businessPhones\": [\r\n \"+1 309 555 0104\"\r\n ],\r\n \"displayName\": \"Grady Archie\",\r\n \"givenName\": \"Grady\",\r\n \"jobTitle\": \"CVP Legal\",\r\n \"mail\": \"[email protected]\",\r\n \"mobilePhone\": null,\r\n \"officeLocation\": \"19\/2109\",\r\n \"preferredLanguage\": \"en-US\",\r\n \"surname\": \"Archie\",\r\n \"userPrincipalName\": \"[email protected]\"\r\n },\r\n {\r\n \"@odata.type\": \"#microsoft.graph.user\",\r\n \"id\": \"ec63c778-24e1-4240-bea3-d12a167d5232\",\r\n \"businessPhones\": [\r\n \"+20 255501070\"\r\n ],\r\n \"displayName\": \"Pradeep Gupta\",\r\n \"givenName\": \"Pradeep\",\r\n \"jobTitle\": \"Accountant II\",\r\n \"mail\": \"[email protected]\",\r\n \"mobilePhone\": null,\r\n \"officeLocation\": \"98\/2202\",\r\n \"preferredLanguage\": \"en-US\",\r\n \"surname\": \"Gupta\",\r\n \"userPrincipalName\": \"[email protected]\"\r\n },\r\n {\r\n \"@odata.type\": \"#microsoft.graph.user\",\r\n \"id\": \"48d31887-5fad-4d73-a9f5-3c356e68a038\",\r\n \"businessPhones\": [\r\n \"+1 412 555 0109\"\r\n ],\r\n \"displayName\": \"Megan Bowen\",\r\n \"givenName\": \"Megan\",\r\n \"jobTitle\": \"Auditor\",\r\n \"mail\": \"[email protected]\",\r\n \"mobilePhone\": null,\r\n \"officeLocation\": \"12\/1110\",\r\n \"preferredLanguage\": \"en-US\",\r\n \"surname\": \"Bowen\",\r\n \"userPrincipalName\": \"[email protected]\"\r\n },\r\n {\r\n \"@odata.type\": \"#microsoft.graph.user\",\r\n \"id\": \"e8a02cc7-df4d-4778-956d-784cc9506e5a\",\r\n \"businessPhones\": [\r\n \"+1 918 555 0104\"\r\n ],\r\n \"displayName\": \"Lynne Robbins\",\r\n \"givenName\": \"Lynne\",\r\n \"jobTitle\": \"Product Manager\",\r\n \"mail\": \"[email protected]\",\r\n \"mobilePhone\": null,\r\n \"officeLocation\": \"20\/1104\",\r\n \"preferredLanguage\": \"en-US\",\r\n \"surname\": \"Robbins\",\r\n \"userPrincipalName\": \"[email protected]\"\r\n },\r\n {\r\n \"@odata.type\": \"#microsoft.graph.user\",\r\n \"id\": \"c8913c86-ceea-4d39-b1ea-f63a5b675166\",\r\n \"businessPhones\": [\r\n \"+1 954 555 0118\"\r\n ],\r\n \"displayName\": \"Henrietta Mueller\",\r\n \"givenName\": \"Henrietta\",\r\n \"jobTitle\": \"Marketing Assistant\",\r\n \"mail\": \"[email protected]\",\r\n \"mobilePhone\": null,\r\n \"officeLocation\": \"18\/1106\",\r\n \"preferredLanguage\": \"en-US\",\r\n \"surname\": \"Mueller\",\r\n \"userPrincipalName\": \"[email protected]\"\r\n },\r\n {\r\n \"@odata.type\": \"#microsoft.graph.user\",\r\n \"id\": \"e3d0513b-449e-4198-ba6f-bd97ae7cae85\",\r\n \"businessPhones\": [\r\n \"+1 918 555 0101\"\r\n ],\r\n \"displayName\": \"Isaiah Langer\",\r\n \"givenName\": \"Isaiah\",\r\n \"jobTitle\": \"Web Marketing Manager\",\r\n \"mail\": \"[email protected]\",\r\n \"mobilePhone\": null,\r\n \"officeLocation\": \"20\/1101\",\r\n \"preferredLanguage\": \"en-US\",\r\n \"surname\": \"Langer\",\r\n \"userPrincipalName\": \"[email protected]\"\r\n }\r\n ]\r\n}"
}
]
2 changes: 2 additions & 0 deletions src/lib/PnP.Framework/Entities/GroupEntity.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using System;
using System.Text.Json.Serialization;

namespace PnP.Framework.Entities
{
Expand All @@ -10,6 +11,7 @@ public class GroupEntity
/// <summary>
/// Group id
/// </summary>
[JsonPropertyName("id")]
public string GroupId { get; set; }
/// <summary>
/// Group display name
Expand Down
5 changes: 5 additions & 0 deletions src/lib/PnP.Framework/Entities/GroupUser.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
using PnP.Framework.Enums;
using System;
using System.Linq;
using System.Text.Json;
using System.Text.Json.Nodes;
using System.Text.Json.Serialization;

namespace PnP.Framework.Entities
{
Expand Down
41 changes: 41 additions & 0 deletions src/lib/PnP.Framework/Entities/GroupUserParser.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
using PnP.Framework.Enums;
using System.Linq;
using System.Text.Json;
using System.Text.Json.Nodes;
using System.Text.Json.Serialization;

namespace PnP.Framework.Entities
{
public class GroupUserParser
{
private class GroupUserRaw
{

public string Id { get; set; }
public string UserPrincipalName { get; set; }

public string DisplayName { get; set; }

[JsonPropertyName("@odata.type")]
public string Type { get; set; }
}
public static GroupUser[] ReadListFromJsonNode(JsonNode inputJson)
{
var rawList = inputJson.Deserialize<GroupUserRaw[]>();
return rawList.Select(raw => raw.Type.Contains("microsoft.graph.user")
? new GroupUser
{
DisplayName = raw.DisplayName,
UserPrincipalName = raw.UserPrincipalName,
Type = GroupUserType.User,
}
: new GroupUser
{
DisplayName = raw.DisplayName,
UserPrincipalName = raw.Id,
Type = GroupUserType.Group,
})
.ToArray();
}
}
}
2 changes: 2 additions & 0 deletions src/lib/PnP.Framework/Entities/UnifiedGroupUser.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using System;
using System.Text.Json.Serialization;

namespace PnP.Framework.Entities
{
Expand Down Expand Up @@ -30,6 +31,7 @@ public class UnifiedGroupUser
/// <summary>
/// Group user's e-mail address
/// </summary>
[JsonPropertyName("mail")]
public string Email { get; set; }
/// <summary>
/// Group user's mobile phone number
Expand Down
3 changes: 2 additions & 1 deletion src/lib/PnP.Framework/Extensions/SiteExtensions.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using PnP.Framework;
using PnP.Framework.Graph;
using PnP.Framework.Utilities;
using System;
using System.Collections.Generic;
using System.Linq;
Expand Down Expand Up @@ -42,7 +43,7 @@ public static void SetSiteClassification(this Site site, string classificationVa
{
classification = classificationValue
},
contentType: "application/json",
contentType: HttpHelper.JsonContentType,
accessToken: accessToken);

// Still update the local value to give prompt feedback to the user
Expand Down
Loading