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

Fix for bug #3589 #3590

Merged
merged 3 commits into from
Nov 21, 2023
Merged

Fix for bug #3589 #3590

merged 3 commits into from
Nov 21, 2023

Conversation

reshmee011
Copy link
Contributor

Type

  • Bug Fix

Related Issues?

Fixes #3589

What is in this Pull Request ?

Update function SetTeamPictureAsync within file SetTeamsTeamPicture.cs to use v1.0/teams/ endpoint instead of v1.0/groups/.

public static async Task SetTeamPictureAsync(PnPConnection connection, string accessToken, string groupId, byte[] bytes, string contentType)
{
var byteArrayContent = new ByteArrayContent(bytes);
byteArrayContent.Headers.ContentType = new System.Net.Http.Headers.MediaTypeHeaderValue(contentType);
await GraphHelper.PutAsync(connection, $"v1.0/teams/{groupId}/photo/$value", accessToken, byteArrayContent);
}

@KoenZomers
Copy link
Collaborator

Thanks @reshmee011 !

@KoenZomers KoenZomers merged commit 660292e into pnp:dev Nov 21, 2023
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] Teams photo update updating M365 group instead of Teams for Set-PnPTeamsTeamPicture
2 participants