Skip to content

Commit 660292e

Browse files
authored
Merge pull request #3590 from reshmee011/Bug-3589
Fix for bug #3589
2 parents 4f85022 + 91cad1c commit 660292e

File tree

4 files changed

+4
-5
lines changed

4 files changed

+4
-5
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -387,6 +387,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).
387387
- Added `Get-PnPDeletedTeam` cmdlet to retrieve all deleted Microsoft Teams teams [#2487](https://github.com/pnp/powershell/pull/2487)
388388
- Added `-ServerRelativePath` and `-Path` parameters to `Set-PnPImageListItemColumn` cmdlet to allow for file to be uploaded for the Image type column. [#2503](https://github.com/pnp/powershell/pull/2503)
389389
- Added support for sovereign tenants in `Get-PnPTenandId` by utilizing the `-AzureEnvironment` parameter. [#2512](https://github.com/pnp/powershell/pull/2512)
390+
- Added `Set-PnPTeamsTeamPicture` which allows setting the picture of a Teams team [#3590](https://github.com/pnp/powershell/pull/3590)
390391

391392
### Changed
392393

documentation/Set-PnPTeamsTeamPicture.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,5 +66,4 @@ Accept wildcard characters: False
6666
6767
## RELATED LINKS
6868
69-
[Microsoft 365 Patterns and Practices](https://aka.ms/m365pnp)
70-
69+
[Microsoft 365 Patterns and Practices](https://aka.ms/m365pnp)

src/Commands/Teams/SetTeamsTeamPicture.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
using PnP.PowerShell.Commands.Utilities;
55
using System.IO;
66
using System.Management.Automation;
7-
using System.Threading.Tasks;
87

98
namespace PnP.PowerShell.Commands.Teams
109
{

src/Commands/Utilities/TeamsUtility.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -419,11 +419,11 @@ public static async Task<Group> UpdateGroupAsync(PnPConnection connection, strin
419419
return await GraphHelper.PatchAsync<Group>(connection, accessToken, $"v1.0/groups/{groupId}", group);
420420
}
421421

422-
public static async Task SetTeamPictureAsync(PnPConnection connection, string accessToken, string groupId, byte[] bytes, string contentType)
422+
public static async Task SetTeamPictureAsync(PnPConnection connection, string accessToken, string teamId, byte[] bytes, string contentType)
423423
{
424424
var byteArrayContent = new ByteArrayContent(bytes);
425425
byteArrayContent.Headers.ContentType = new System.Net.Http.Headers.MediaTypeHeaderValue(contentType);
426-
await GraphHelper.PutAsync<string>(connection, $"v1.0/groups/{groupId}/photo/$value", accessToken, byteArrayContent);
426+
await GraphHelper.PutAsync<string>(connection, $"v1.0/teams/{teamId}/photo/$value", accessToken, byteArrayContent);
427427
}
428428

429429
public static async Task<HttpResponseMessage> SetTeamArchivedStateAsync(PnPConnection connection, string accessToken, string groupId, bool archived, bool? setSiteReadOnly)

0 commit comments

Comments
 (0)