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

Get-MgTeamChannelMessageHostedContent does not output contents #3052

Open
DP3103 opened this issue Dec 11, 2024 · 0 comments
Open

Get-MgTeamChannelMessageHostedContent does not output contents #3052

DP3103 opened this issue Dec 11, 2024 · 0 comments
Labels
status:waiting-for-triage An issue that is yet to be reviewed or assigned type:bug A broken experience

Comments

@DP3103
Copy link

DP3103 commented Dec 11, 2024

Describe the bug

Trying to retrieve images in a channel post using the Get-MgTeamChannelMessageHostedContent. The permissions are accurate and the command runs successfully but the output contains value only in the "ID" field . contentBytes and contentType are always null.

Expected behavior

Expected behavior is -
contentBytes contains the base64-encoded content.
contentType specifies the type of the content, such as image/png.

How to reproduce

Get-MgBetaTeamChannelMessageHostedContent -TeamId $souceteamId -ChannelId $sourcechannelId -ChatMessageId 1699598551339 -debug

SDK Version

2.0.0 Microsoft.Graph.Beta.Teams

Latest version known to work for scenario above?

No response

Known Workarounds

No workaround found so far.

Debug output

Click to expand log ```

PS C:\Temp> Get-MgBetaTeamChannelMessageHostedContent -TeamId $souceteamId -ChannelId $sourcechannelId -ChatMessageId 1699598551339 -debug
DEBUG: [CmdletBeginProcessing]: - Get-MgBetaTeamChannelMessageHostedContent begin processing with parameterSet 'List'.
DEBUG: [Authentication]: - AuthType: 'Delegated', TokenCredentialType: 'InteractiveBrowser', ContextScope: 'CurrentUser', AppName: 'Microsoft Graph Command Line Tools'.
DEBUG: [Authentication]: - Scopes: [AuditLog.Read.All, ChannelMessage.Send, CloudPC.ReadWrite.All, Device.ReadWrite.All, DeviceManagementApps.Read.All, DeviceManagementApps.ReadWrite.All, DeviceManagementConfigurati
on.Read.All, DeviceManagementConfiguration.ReadWrite.All, DeviceManagementManagedDevices.PrivilegedOperations.All, DeviceManagementManagedDevices.ReadWrite.All, DeviceManagementRBAC.ReadWrite.All, DeviceManagementSe
rviceConfig.ReadWrite.All, Directory.Read.All, Group.ReadWrite.All, GroupMember.ReadWrite.All, openid, profile, User.Read, User.ReadWrite.All, WindowsUpdates.ReadWrite.All, email].
DEBUG: ============================ HTTP REQUEST ============================

HTTP Method:
GET

Absolute Uri:
https://graph.microsoft.com/beta/teams/da6553bc-b137-4083-8c28-b34d4c7680b7/channels/19:OqwpjpJJDfJh4tYEsmml6FEQkmVwjJ9rfIa6nVsTeT01%40thread.tacv2/messages/1699598551339/hostedContents

Headers:
SdkVersion : graph-powershell-beta/2.0.0,Graph-dotnet-2.0.15
FeatureFlag : 00000047
Cache-Control : no-store, no-cache
User-Agent : Mozilla/5.0,(Windows NT 10.0; Microsoft Windows 10.0.22631; en-US),PowerShell/5.1.22621.4391
Accept-Encoding : gzip

Body:

DEBUG: ============================ HTTP RESPONSE ============================

Status Code:
OK

Headers:
Date : Wed, 11 Dec 2024 19:31:26 GMT
Vary : Accept-Encoding
strict-transport-security : max-age=31536000
request-id : dcd5c782-efc1-4d0d-9cee-d179b1d5dc13
client-request-id : dcd5c782-efc1-4d0d-9cee-d179b1d5dc13
x-ms-ags-diagnostic : {"ServerInfo":{"DataCenter":"Canada Central","Slice":"E","Ring":"3","ScaleUnit":"001","RoleInstance":"YT1PEPF00001ABA"}}
odata-version : 4.0

Body:
{
"@odata.context": "https://graph.microsoft.com/beta/$metadata#teams('da6553bc-b137-4083-8c28-b34d4c7680b7')/channels('19%3AOqwpjpJJDfJh4tYEsmml6FEQkmVwjJ9rfIa6nVsTeT01%40thread.tacv2')/messages('1699598551339')/ho
stedContents",
"@odata.count": 1,
"value": [
{
"id": "aWQ9eF8wLXdldS1kMTEtMGViNjk5ZDZkZjhjOGM5ZDg4MDk5YWM2OTg2NTcxOTQsdHlwZT0xLHVybD1odHRwczovL2V1LWFwaS5hc20uc2t5cGUuY29tL3YxL29iamVjdHMvMC13ZXUtZDExLTBlYjY5OWQ2ZGY4YzhjOWQ4ODA5OWFjNjk4NjU3MTk0L3ZpZXdzL2ltZ2
8=",
"contentBytes": null,
"contentType": null
}
]
}

</details>


### Configuration

Windows 11

### Other information

_No response_
@DP3103 DP3103 added status:waiting-for-triage An issue that is yet to be reviewed or assigned type:bug A broken experience labels Dec 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status:waiting-for-triage An issue that is yet to be reviewed or assigned type:bug A broken experience
Projects
None yet
Development

No branches or pull requests

1 participant