Unable to change icon image of Power Pages agent widget

Shijo George 0 Reputation points
2025-10-16T09:21:01.5033333+00:00

Hi,

https://learn.microsoft.com/en-us/power-pages/getting-started/customize-your-agent?tabs=modern&source=docs#agent-widget

Screenshot 2025-10-15 173533

I would like to change the icons of (out-of-the-box) Power Pages agent. I tried adding the lines of code shared in the Microsoft Learn documentation. But, when the code tries to update innerHTML, it fails to update and the HTML element is undefined.

Uncaught TypeError: Cannot set properties of undefined (setting 'innerHTML')

at HTMLDocument.<anonymous> ((index):1040:26)

I tried adding the JS code to both header and footer web templates, but nothing changed.

Any help on this? Thanks.

Microsoft Copilot | Other
0 comments No comments

Your answer

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