Skip to content
This repository has been archived by the owner on Jan 19, 2021. It is now read-only.

Commit

Permalink
Merge pull request #2720 from gautamdsheth/feature/removeObsoleteUnif…
Browse files Browse the repository at this point in the history
…iedGroupMethod

Fix: removed usage of obsolete ListUnifiedGroups method
  • Loading branch information
erwinvanhunen authored Jun 11, 2020
2 parents c297004 + 3136ad4 commit d8bb581
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).
### Changed

### Contributors
- Gautam Sheth [gautamdsheth]

## [3.22.2006.2]

Expand Down
4 changes: 2 additions & 2 deletions Commands/Base/PipeBinds/UnifiedGroupPipeBind.cs
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,10 @@ public UnifiedGroupEntity GetGroup(string accessToken, bool includeClassificatio
}
else if (!string.IsNullOrEmpty(DisplayName))
{
var groups = UnifiedGroupsUtility.ListUnifiedGroups(accessToken, DisplayName, includeSite: true, includeClassification:includeClassification);
var groups = UnifiedGroupsUtility.GetUnifiedGroups(accessToken, DisplayName, includeSite: true, includeClassification:includeClassification);
if (groups == null || groups.Count == 0)
{
groups = UnifiedGroupsUtility.ListUnifiedGroups(accessToken, mailNickname: DisplayName, includeSite: true, includeClassification:includeClassification);
groups = UnifiedGroupsUtility.GetUnifiedGroups(accessToken, mailNickname: DisplayName, includeSite: true, includeClassification:includeClassification);
}
if (groups != null && groups.Any())
{
Expand Down
2 changes: 1 addition & 1 deletion Commands/Graph/GetUnifiedGroup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ protected override void ExecuteCmdlet()
else
{
// Retrieve all the groups
groups = UnifiedGroupsUtility.ListUnifiedGroups(AccessToken, includeSite: !ExcludeSiteUrl.IsPresent, includeClassification:IncludeClassification.IsPresent, includeHasTeam: IncludeHasTeam.IsPresent);
groups = UnifiedGroupsUtility.GetUnifiedGroups(AccessToken, includeSite: !ExcludeSiteUrl.IsPresent, includeClassification:IncludeClassification.IsPresent, includeHasTeam: IncludeHasTeam.IsPresent);
}

if (group != null)
Expand Down
2 changes: 1 addition & 1 deletion Commands/Graph/NewUnifiedGroup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ protected override void ExecuteCmdlet()

if (!Force)
{
var candidates = UnifiedGroupsUtility.ListUnifiedGroups(AccessToken,
var candidates = UnifiedGroupsUtility.GetUnifiedGroups(AccessToken,
mailNickname: MailNickname,
endIndex: 1);
// ListUnifiedGroups retrieves groups with starts-with, so need another check
Expand Down

0 comments on commit d8bb581

Please sign in to comment.