From 744247507590c431c83ec2d2fd2bd2375300a411 Mon Sep 17 00:00:00 2001 From: Philippe Partarrieu Date: Thu, 20 Aug 2020 13:28:16 +0200 Subject: [PATCH 1/3] Use next link from group membership request loadUser only gets the first 100 groups a user belongs to rather than using the odata.nextLink in the response to get the full list of groups. Fix this by checking if the response contains an odata.nextLink and then build the URL appropriately for the configured API version. For V1, odata.nextLink contains a skip token which we extract. More information here: https://docs.microsoft.com/en-us/previous-versions/azure/ad/graph/api/users-operations#get-a-users-manager-- For V2, odata.nextLink can be used directly as the URL for the request as specified here: https://docs.microsoft.com/en-us/graph/paging fix #14222 --- .../aad/controller/TodoListController.java | 2 +- sdk/spring/azure-spring-boot/pom.xml | 7 +++ .../autoconfigure/aad/AzureADGraphClient.java | 36 ++++++------ .../spring/autoconfigure/aad/UserGroup.java | 28 +++++++++- .../spring/autoconfigure/aad/UserGroups.java | 55 +++++++++++++++++++ .../aad/AzureADGraphClientTest.java | 6 +- .../autoconfigure/aad/UserGroupTest.java | 11 +++- 7 files changed, 116 insertions(+), 29 deletions(-) create mode 100644 sdk/spring/azure-spring-boot/src/main/java/com/microsoft/azure/spring/autoconfigure/aad/UserGroups.java diff --git a/sdk/spring/azure-spring-boot-samples/azure-spring-boot-sample-active-directory/src/main/java/com/microsoft/azure/aad/controller/TodoListController.java b/sdk/spring/azure-spring-boot-samples/azure-spring-boot-sample-active-directory/src/main/java/com/microsoft/azure/aad/controller/TodoListController.java index 09017c9a3dc9..e972685eada7 100644 --- a/sdk/spring/azure-spring-boot-samples/azure-spring-boot-sample-active-directory/src/main/java/com/microsoft/azure/aad/controller/TodoListController.java +++ b/sdk/spring/azure-spring-boot-samples/azure-spring-boot-sample-active-directory/src/main/java/com/microsoft/azure/aad/controller/TodoListController.java @@ -93,7 +93,7 @@ public ResponseEntity deleteTodoItem(@PathVariable("id") int id, final UserPrincipal current = (UserPrincipal) authToken.getPrincipal(); if (current.isMemberOf( - new UserGroup("xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "group1"))) { + new UserGroup("xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "Group", "group1"))) { final List find = todoList.stream().filter(i -> i.getID() == id).collect(Collectors.toList()); if (!find.isEmpty()) { todoList.remove(todoList.indexOf(find.get(0))); diff --git a/sdk/spring/azure-spring-boot/pom.xml b/sdk/spring/azure-spring-boot/pom.xml index 2992d278c717..56c8ace17f51 100644 --- a/sdk/spring/azure-spring-boot/pom.xml +++ b/sdk/spring/azure-spring-boot/pom.xml @@ -196,6 +196,12 @@ 2.11.2 + + com.fasterxml.jackson.datatype + jackson-datatype-jdk8 + 2.11.2 + + @@ -263,6 +269,7 @@ com.fasterxml.jackson.core:jackson-databind:[2.11.2] + com.fasterxml.jackson.datatype:jackson-datatype-jdk8:[2.11.2] net.minidev:json-smart:[2.3] com.microsoft.azure:msal4j:[1.6.1] com.microsoft.azure:spring-data-cosmosdb:[2.3.0] diff --git a/sdk/spring/azure-spring-boot/src/main/java/com/microsoft/azure/spring/autoconfigure/aad/AzureADGraphClient.java b/sdk/spring/azure-spring-boot/src/main/java/com/microsoft/azure/spring/autoconfigure/aad/AzureADGraphClient.java index f6f2b52d2729..55754df10e21 100644 --- a/sdk/spring/azure-spring-boot/src/main/java/com/microsoft/azure/spring/autoconfigure/aad/AzureADGraphClient.java +++ b/sdk/spring/azure-spring-boot/src/main/java/com/microsoft/azure/spring/autoconfigure/aad/AzureADGraphClient.java @@ -3,8 +3,8 @@ package com.microsoft.azure.spring.autoconfigure.aad; -import com.fasterxml.jackson.databind.JsonNode; import com.fasterxml.jackson.databind.ObjectMapper; +import com.fasterxml.jackson.datatype.jdk8.Jdk8Module; import com.microsoft.aad.msal4j.ClientCredentialFactory; import com.microsoft.aad.msal4j.ConfidentialClientApplication; import com.microsoft.aad.msal4j.IAuthenticationResult; @@ -33,6 +33,7 @@ import java.util.HashSet; import java.util.LinkedHashSet; import java.util.List; +import java.util.Optional; import java.util.Set; import java.util.UUID; import java.util.concurrent.CompletableFuture; @@ -40,7 +41,6 @@ import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import java.util.stream.Collectors; -import java.util.stream.StreamSupport; /** * Microsoft Graph client encapsulation. @@ -77,7 +77,7 @@ private void initAADMicrosoftGraphApiBool(String endpointEnv) { this.aadMicrosoftGraphApiBool = endpointEnv.contains(V2_VERSION_ENV_FLAG); } - private String getUserMembershipsV1(String accessToken) throws IOException { + private String getUserMemberships(String accessToken, Optional odataNextLink) throws IOException { final URL url = new URL(serviceEndpoints.getAadMembershipRestUri()); final HttpURLConnection conn = (HttpURLConnection) url.openConnection(); // Set the appropriate header fields in the request header. @@ -121,22 +121,21 @@ public List getGroups(String graphApiToken) throws IOException { } private List loadUserGroups(String graphApiToken) throws IOException { - final String responseInJson = getUserMembershipsV1(graphApiToken); + String responseInJson = getUserMemberships(graphApiToken, Optional.empty()); final List lUserGroups = new ArrayList<>(); final ObjectMapper objectMapper = JacksonObjectMapperFactory.getInstance(); - final JsonNode rootNode = objectMapper.readValue(responseInJson, JsonNode.class); - final JsonNode valuesNode = rootNode.get("value"); - - if (valuesNode != null) { - lUserGroups - .addAll(StreamSupport.stream(valuesNode.spliterator(), false).filter(this::isMatchingUserGroupKey) - .map(node -> { - final String objectID = node. - get(aadAuthenticationProperties.getUserGroup().getObjectIDKey()).asText(); - final String displayName = node.get("displayName").asText(); - return new UserGroup(objectID, displayName); - }).collect(Collectors.toList())); + objectMapper.registerModule(new Jdk8Module()); + UserGroups groupsFromJson = objectMapper.readValue(responseInJson, UserGroups.class); + if (groupsFromJson.getValue() != null) { + lUserGroups.addAll(groupsFromJson.getValue().stream().filter(this::isMatchingUserGroupKey) + .collect(Collectors.toList())); + } + while (groupsFromJson.getOdataNextLink().isPresent()) { + responseInJson = getUserMemberships(graphApiToken, groupsFromJson.getOdataNextLink()); + groupsFromJson = objectMapper.readValue(responseInJson, UserGroups.class); + lUserGroups.addAll(groupsFromJson.getValue().stream().filter(this::isMatchingUserGroupKey) + .collect(Collectors.toList())); } return lUserGroups; @@ -149,9 +148,8 @@ private List loadUserGroups(String graphApiToken) throws IOException * {@link AADAuthenticationProperties.UserGroupProperties} * @return true if the json node contains the correct key, and expected value to identify a user group. */ - private boolean isMatchingUserGroupKey(final JsonNode node) { - return node.get(aadAuthenticationProperties.getUserGroup().getKey()).asText() - .equals(aadAuthenticationProperties.getUserGroup().getValue()); + private boolean isMatchingUserGroupKey(final UserGroup group) { + return group.getObjectType().equals(aadAuthenticationProperties.getUserGroup().getValue()); } public Set getGrantedAuthorities(String graphApiToken) throws IOException { diff --git a/sdk/spring/azure-spring-boot/src/main/java/com/microsoft/azure/spring/autoconfigure/aad/UserGroup.java b/sdk/spring/azure-spring-boot/src/main/java/com/microsoft/azure/spring/autoconfigure/aad/UserGroup.java index 360ae47ebb29..0fc76cfa1131 100644 --- a/sdk/spring/azure-spring-boot/src/main/java/com/microsoft/azure/spring/autoconfigure/aad/UserGroup.java +++ b/sdk/spring/azure-spring-boot/src/main/java/com/microsoft/azure/spring/autoconfigure/aad/UserGroup.java @@ -6,21 +6,42 @@ import java.io.Serializable; import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonAlias; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; + +@JsonIgnoreProperties(ignoreUnknown = true) public class UserGroup implements Serializable { private static final long serialVersionUID = 9064197572478554735L; + @JsonProperty("objectId") + @JsonAlias("id") private String objectID; + + @JsonProperty("objectType") + @JsonAlias("@odata.type") + private String objectType; + + @JsonProperty("displayName") private String displayName; - public UserGroup(String objectID, String displayName) { + public UserGroup(String objectID, String objectType, String displayName) { this.objectID = objectID; + this.objectType = objectType; this.displayName = displayName; } + public UserGroup() { + } + public String getDisplayName() { return displayName; } + public String getObjectType() { + return objectType; + } + public String getObjectID() { return objectID; } @@ -35,11 +56,12 @@ public boolean equals(Object o) { } final UserGroup group = (UserGroup) o; return this.getDisplayName().equals(group.getDisplayName()) - && this.getObjectID().equals(group.getObjectID()); + && this.getObjectID().equals(group.getObjectID()) + && this.getObjectType().equals(group.getObjectType()); } @Override public int hashCode() { - return Objects.hash(objectID, displayName); + return Objects.hash(objectID, objectType, displayName); } } diff --git a/sdk/spring/azure-spring-boot/src/main/java/com/microsoft/azure/spring/autoconfigure/aad/UserGroups.java b/sdk/spring/azure-spring-boot/src/main/java/com/microsoft/azure/spring/autoconfigure/aad/UserGroups.java new file mode 100644 index 000000000000..1d9ee8fa18bb --- /dev/null +++ b/sdk/spring/azure-spring-boot/src/main/java/com/microsoft/azure/spring/autoconfigure/aad/UserGroups.java @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.microsoft.azure.spring.autoconfigure.aad; + +import java.util.List; +import java.util.Objects; +import java.util.Optional; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; + +@JsonIgnoreProperties(ignoreUnknown = true) +public class UserGroups { + + @JsonProperty("odata.nextLink") + private Optional odataNextLink; + + @JsonProperty("value") + private List value; + + public UserGroups(Optional odataNextLink, List value) { + this.odataNextLink = odataNextLink; + this.value = value; + } + + public UserGroups() { + } + + public Optional getOdataNextLink() { + return odataNextLink; + } + + public List getValue() { + return value; + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (!(o instanceof UserGroups)) { + return false; + } + final UserGroups groups = (UserGroups) o; + return this.getOdataNextLink().equals(groups.getOdataNextLink()) + && this.getValue().equals(groups.getValue()); + } + + @Override + public int hashCode() { + return Objects.hash(odataNextLink, value); + } +} diff --git a/sdk/spring/azure-spring-boot/src/test/java/com/microsoft/azure/spring/autoconfigure/aad/AzureADGraphClientTest.java b/sdk/spring/azure-spring-boot/src/test/java/com/microsoft/azure/spring/autoconfigure/aad/AzureADGraphClientTest.java index 34b8ecd7b9e1..e2a5c429fb8e 100644 --- a/sdk/spring/azure-spring-boot/src/test/java/com/microsoft/azure/spring/autoconfigure/aad/AzureADGraphClientTest.java +++ b/sdk/spring/azure-spring-boot/src/test/java/com/microsoft/azure/spring/autoconfigure/aad/AzureADGraphClientTest.java @@ -41,7 +41,7 @@ public void setup() { public void testConvertGroupToGrantedAuthorities() { final List userGroups = Collections.singletonList( - new UserGroup("testId", "Test_Group")); + new UserGroup("testId", "Group", "Test_Group")); final Set authorities = adGraphClient.convertGroupsToGrantedAuthorities(userGroups); assertThat(authorities).hasSize(1).extracting(GrantedAuthority::getAuthority) @@ -51,8 +51,8 @@ public void testConvertGroupToGrantedAuthorities() { @Test public void testConvertGroupToGrantedAuthoritiesUsingAllowedGroups() { final List userGroups = Arrays - .asList(new UserGroup("testId", "Test_Group"), - new UserGroup("testId", "Another_Group")); + .asList(new UserGroup("testId", "Group", "Test_Group"), + new UserGroup("testId", "Group", "Another_Group")); aadAuthProps.getUserGroup().getAllowedGroups().add("Another_Group"); final Set authorities = adGraphClient.convertGroupsToGrantedAuthorities(userGroups); assertThat(authorities).hasSize(2).extracting(GrantedAuthority::getAuthority) diff --git a/sdk/spring/azure-spring-boot/src/test/java/com/microsoft/azure/spring/autoconfigure/aad/UserGroupTest.java b/sdk/spring/azure-spring-boot/src/test/java/com/microsoft/azure/spring/autoconfigure/aad/UserGroupTest.java index 08906553218c..8851acc5af14 100644 --- a/sdk/spring/azure-spring-boot/src/test/java/com/microsoft/azure/spring/autoconfigure/aad/UserGroupTest.java +++ b/sdk/spring/azure-spring-boot/src/test/java/com/microsoft/azure/spring/autoconfigure/aad/UserGroupTest.java @@ -7,13 +7,18 @@ import org.junit.Test; public class UserGroupTest { - private static final UserGroup GROUP_1 = new UserGroup("12345", "test"); + private static final UserGroup GROUP_1 = new UserGroup("12345", "Group", "test"); @Test public void getDisplayName() { Assert.assertEquals("test", GROUP_1.getDisplayName()); } + @Test + public void getObjectType() { + Assert.assertEquals("Group", GROUP_1.getObjectType()); + } + @Test public void getObjectID() { Assert.assertEquals("12345", GROUP_1.getObjectID()); @@ -21,13 +26,13 @@ public void getObjectID() { @Test public void equals() { - final UserGroup group2 = new UserGroup("12345", "test"); + final UserGroup group2 = new UserGroup("12345", "Group", "test"); Assert.assertEquals(GROUP_1, group2); } @Test public void hashCodeTest() { - final UserGroup group2 = new UserGroup("12345", "test"); + final UserGroup group2 = new UserGroup("12345", "Group", "test"); Assert.assertEquals(GROUP_1.hashCode(), group2.hashCode()); } } From b864a8eb603ab5630f0af894acaf17ec44f789bc Mon Sep 17 00:00:00 2001 From: Philippe Partarrieu Date: Wed, 26 Aug 2020 17:42:16 +0200 Subject: [PATCH 2/3] Remove jackson datatype dep Change the type of the odata.nextLink from Optional to String --- sdk/spring/azure-spring-boot/pom.xml | 7 ---- .../autoconfigure/aad/AzureADGraphClient.java | 32 +++++++++++++++---- .../spring/autoconfigure/aad/UserGroup.java | 17 ++++------ .../spring/autoconfigure/aad/UserGroups.java | 17 ++++------ .../aad/azure-ad-graph-user-groups.json | 3 +- .../aad/microsoft-graph-user-groups.json | 3 +- 6 files changed, 40 insertions(+), 39 deletions(-) diff --git a/sdk/spring/azure-spring-boot/pom.xml b/sdk/spring/azure-spring-boot/pom.xml index 56c8ace17f51..2992d278c717 100644 --- a/sdk/spring/azure-spring-boot/pom.xml +++ b/sdk/spring/azure-spring-boot/pom.xml @@ -196,12 +196,6 @@ 2.11.2 - - com.fasterxml.jackson.datatype - jackson-datatype-jdk8 - 2.11.2 - - @@ -269,7 +263,6 @@ com.fasterxml.jackson.core:jackson-databind:[2.11.2] - com.fasterxml.jackson.datatype:jackson-datatype-jdk8:[2.11.2] net.minidev:json-smart:[2.3] com.microsoft.azure:msal4j:[1.6.1] com.microsoft.azure:spring-data-cosmosdb:[2.3.0] diff --git a/sdk/spring/azure-spring-boot/src/main/java/com/microsoft/azure/spring/autoconfigure/aad/AzureADGraphClient.java b/sdk/spring/azure-spring-boot/src/main/java/com/microsoft/azure/spring/autoconfigure/aad/AzureADGraphClient.java index 55754df10e21..cf6d1624b590 100644 --- a/sdk/spring/azure-spring-boot/src/main/java/com/microsoft/azure/spring/autoconfigure/aad/AzureADGraphClient.java +++ b/sdk/spring/azure-spring-boot/src/main/java/com/microsoft/azure/spring/autoconfigure/aad/AzureADGraphClient.java @@ -33,7 +33,6 @@ import java.util.HashSet; import java.util.LinkedHashSet; import java.util.List; -import java.util.Optional; import java.util.Set; import java.util.UUID; import java.util.concurrent.CompletableFuture; @@ -77,8 +76,8 @@ private void initAADMicrosoftGraphApiBool(String endpointEnv) { this.aadMicrosoftGraphApiBool = endpointEnv.contains(V2_VERSION_ENV_FLAG); } - private String getUserMemberships(String accessToken, Optional odataNextLink) throws IOException { - final URL url = new URL(serviceEndpoints.getAadMembershipRestUri()); + private String getUserMemberships(String accessToken, String odataNextLink) throws IOException { + final URL url = buildUrl(odataNextLink); final HttpURLConnection conn = (HttpURLConnection) url.openConnection(); // Set the appropriate header fields in the request header. @@ -103,6 +102,26 @@ private String getUserMemberships(String accessToken, Optional odataNext } } + private String getSkipTokenFromLink(String odataNextLink) { + String[] parts = odataNextLink.split("/memberOf\\?"); + return parts[1]; + } + + private URL buildUrl(String odataNextLink) throws MalformedURLException { + URL url; + if (odataNextLink != null) { + if (this.aadMicrosoftGraphApiBool) { + url = new URL(odataNextLink); + } else { + String skipToken = getSkipTokenFromLink(odataNextLink); + url = new URL(serviceEndpoints.getAadMembershipRestUri() + "&" + skipToken); + } + } else { + url = new URL(serviceEndpoints.getAadMembershipRestUri()); + } + return url; + } + private static String getResponseStringFromConn(HttpURLConnection conn) throws IOException { try (BufferedReader reader = new BufferedReader( @@ -121,17 +140,16 @@ public List getGroups(String graphApiToken) throws IOException { } private List loadUserGroups(String graphApiToken) throws IOException { - String responseInJson = getUserMemberships(graphApiToken, Optional.empty()); + String responseInJson = getUserMemberships(graphApiToken, null); final List lUserGroups = new ArrayList<>(); final ObjectMapper objectMapper = JacksonObjectMapperFactory.getInstance(); - objectMapper.registerModule(new Jdk8Module()); UserGroups groupsFromJson = objectMapper.readValue(responseInJson, UserGroups.class); if (groupsFromJson.getValue() != null) { lUserGroups.addAll(groupsFromJson.getValue().stream().filter(this::isMatchingUserGroupKey) .collect(Collectors.toList())); } - while (groupsFromJson.getOdataNextLink().isPresent()) { + while (groupsFromJson.getOdataNextLink() != null) { responseInJson = getUserMemberships(graphApiToken, groupsFromJson.getOdataNextLink()); groupsFromJson = objectMapper.readValue(responseInJson, UserGroups.class); lUserGroups.addAll(groupsFromJson.getValue().stream().filter(this::isMatchingUserGroupKey) @@ -142,7 +160,7 @@ private List loadUserGroups(String graphApiToken) throws IOException } /** - * Checks that the JSON Node is a valid User Group to extract User Groups from + * Checks that the UserGroup has a Group object type. * * @param node - json node to look for a key/value to equate against the * {@link AADAuthenticationProperties.UserGroupProperties} diff --git a/sdk/spring/azure-spring-boot/src/main/java/com/microsoft/azure/spring/autoconfigure/aad/UserGroup.java b/sdk/spring/azure-spring-boot/src/main/java/com/microsoft/azure/spring/autoconfigure/aad/UserGroup.java index 0fc76cfa1131..6d1857bcfb0d 100644 --- a/sdk/spring/azure-spring-boot/src/main/java/com/microsoft/azure/spring/autoconfigure/aad/UserGroup.java +++ b/sdk/spring/azure-spring-boot/src/main/java/com/microsoft/azure/spring/autoconfigure/aad/UserGroup.java @@ -7,6 +7,7 @@ import java.util.Objects; import com.fasterxml.jackson.annotation.JsonAlias; +import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; @@ -14,26 +15,20 @@ public class UserGroup implements Serializable { private static final long serialVersionUID = 9064197572478554735L; - @JsonProperty("objectId") - @JsonAlias("id") private String objectID; - - @JsonProperty("objectType") - @JsonAlias("@odata.type") private String objectType; - - @JsonProperty("displayName") private String displayName; - public UserGroup(String objectID, String objectType, String displayName) { + @JsonCreator + public UserGroup( + @JsonProperty("objectId") @JsonAlias("id") String objectID, + @JsonProperty("objectType") @JsonAlias("@odata.type") String objectType, + @JsonProperty("displayName") String displayName) { this.objectID = objectID; this.objectType = objectType; this.displayName = displayName; } - public UserGroup() { - } - public String getDisplayName() { return displayName; } diff --git a/sdk/spring/azure-spring-boot/src/main/java/com/microsoft/azure/spring/autoconfigure/aad/UserGroups.java b/sdk/spring/azure-spring-boot/src/main/java/com/microsoft/azure/spring/autoconfigure/aad/UserGroups.java index 1d9ee8fa18bb..a909ed6a3be7 100644 --- a/sdk/spring/azure-spring-boot/src/main/java/com/microsoft/azure/spring/autoconfigure/aad/UserGroups.java +++ b/sdk/spring/azure-spring-boot/src/main/java/com/microsoft/azure/spring/autoconfigure/aad/UserGroups.java @@ -5,29 +5,26 @@ import java.util.List; import java.util.Objects; -import java.util.Optional; +import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; @JsonIgnoreProperties(ignoreUnknown = true) public class UserGroups { - @JsonProperty("odata.nextLink") - private Optional odataNextLink; - - @JsonProperty("value") + private String odataNextLink; private List value; - public UserGroups(Optional odataNextLink, List value) { + @JsonCreator + public UserGroups( + @JsonProperty("odata.nextLink") String odataNextLink, + @JsonProperty("value") List value) { this.odataNextLink = odataNextLink; this.value = value; } - public UserGroups() { - } - - public Optional getOdataNextLink() { + public String getOdataNextLink() { return odataNextLink; } diff --git a/sdk/spring/azure-spring-boot/src/test/resources/aad/azure-ad-graph-user-groups.json b/sdk/spring/azure-spring-boot/src/test/resources/aad/azure-ad-graph-user-groups.json index baf41c7408b2..93441b9088b2 100644 --- a/sdk/spring/azure-spring-boot/src/test/resources/aad/azure-ad-graph-user-groups.json +++ b/sdk/spring/azure-spring-boot/src/test/resources/aad/azure-ad-graph-user-groups.json @@ -60,6 +60,5 @@ "provisioningErrors": [], "proxyAddresses": [], "securityEnabled": true - }], - "odata.nextLink": "directoryObjects/$/Microsoft.DirectoryServices.User/12345678-2898-434a-a370-8ec974c2fb57/memberOf?$skiptoken=X'445370740700010000000000000000100000009D29CBA7B45D854A84FF7F9B636BD9DC000000000000000000000017312E322E3834302E3131333535362E312E342E3233333100000000'" + }] } diff --git a/sdk/spring/azure-spring-boot/src/test/resources/aad/microsoft-graph-user-groups.json b/sdk/spring/azure-spring-boot/src/test/resources/aad/microsoft-graph-user-groups.json index 93497a317b70..1e8bdf1396d2 100644 --- a/sdk/spring/azure-spring-boot/src/test/resources/aad/microsoft-graph-user-groups.json +++ b/sdk/spring/azure-spring-boot/src/test/resources/aad/microsoft-graph-user-groups.json @@ -75,6 +75,5 @@ "securityEnabled": true, "visibility": null, "onPremisesProvisioningErrors": [] - }], - "odata.nextLink": "directoryObjects/$/Microsoft.DirectoryServices.User/12345678-2898-434a-a370-8ec974c2fb57/memberOf?$skiptoken=X'445370740700010000000000000000100000009D29CBA7B45D854A84FF7F9B636BD9DC000000000000000000000017312E322E3834302E3131333535362E312E342E3233333100000000'" + }] } From e3c832f87cf65219dd7b500ab25a998c38dab8a3 Mon Sep 17 00:00:00 2001 From: Philippe Partarrieu Date: Wed, 26 Aug 2020 18:24:16 +0200 Subject: [PATCH 3/3] Remove unused Jdk8Module import --- .../azure/spring/autoconfigure/aad/AzureADGraphClient.java | 1 - 1 file changed, 1 deletion(-) diff --git a/sdk/spring/azure-spring-boot/src/main/java/com/microsoft/azure/spring/autoconfigure/aad/AzureADGraphClient.java b/sdk/spring/azure-spring-boot/src/main/java/com/microsoft/azure/spring/autoconfigure/aad/AzureADGraphClient.java index cf6d1624b590..571d2bb88ed6 100644 --- a/sdk/spring/azure-spring-boot/src/main/java/com/microsoft/azure/spring/autoconfigure/aad/AzureADGraphClient.java +++ b/sdk/spring/azure-spring-boot/src/main/java/com/microsoft/azure/spring/autoconfigure/aad/AzureADGraphClient.java @@ -4,7 +4,6 @@ package com.microsoft.azure.spring.autoconfigure.aad; import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.datatype.jdk8.Jdk8Module; import com.microsoft.aad.msal4j.ClientCredentialFactory; import com.microsoft.aad.msal4j.ConfidentialClientApplication; import com.microsoft.aad.msal4j.IAuthenticationResult;