You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
Hi @DP3103 thank you for logging this issue. As per the Api documentation here, the requested fields are always set to null.
For API related issues/questions we are not best placed to give an answer. Kindly raise an issue here https://developer.microsoft.com/en-us/graph/support so that the API owner can respond to it.
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
}
]
}
The text was updated successfully, but these errors were encountered: