To send Microsoft Graph (MgGraph) traffic over a Service Endpoint from an Azure VM, you need to ensure that the Service Endpoint for Microsoft Azure Active Directory is correctly configured on the subnet where your VM resides. Since you mentioned that the "connect-mggraph" command succeeds, it indicates that the Service Endpoint is functioning for that initial connection.
However, if subsequent queries are failing with an error message, it may not be related to the Service Endpoint itself but rather how the traffic is being routed through your firewall and proxy. Service Endpoints primarily handle TCP traffic, and if your UDR (User Defined Route) is directing all traffic to 0.0.0.0/0 through your firewall, you need to ensure that your firewall and proxy settings allow the necessary HTTP/HTTPS traffic for Microsoft Graph API calls.
In summary, while you can send MgGraph traffic over a Service Endpoint, you should verify that your firewall and proxy are correctly configured to handle the traffic after the initial connection is established. If the traffic is not being forwarded correctly, you may need to adjust your firewall rules or proxy settings accordingly.