Send a chat message with inline image to Team Channel and adjust css/style

ms 1 Reputation point
2022-02-22T04:09:45.303+00:00

I can successfully send a chat message with an inline image to a Teams channel using this example :

Example 5: Send inline images along with the message
in https://learn.microsoft.com/en-us/graph/api/chatmessage-post?view=graph-rest-beta&tabs=csharp

However, while the image appears above the rest of my html/text, it has added padding at the bottom (250px) and doesn't render to its full size, even though I add inline style to override (using !important, etc). So basically I am unable to set or override any styles that are coming from some Teams default style - they just get ignored.
Is there a way to apply a style or override the style that Teams is inserting?

Microsoft Teams
Microsoft Teams
A Microsoft customizable chat-based workspace.
10,139 questions
Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
12,053 questions
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.