The endpoint for retrieving hosted content bytes for an image is
GET https://graph.microsoft.com/beta/chats/{id}/messages/{id}/hostedContents/{id}/$value
However, the id for hostedContents items is Base64 encoded. For those ids that contain a slash (/), the request fails with 400. Encoding the slash as %2f also fails with 400. Switching the slash to _ or - results in 404.
How can I retrieve hostedContents bytes for an image when the id contains a slash?