There is way to unsubscribe way to opt out:
Submits a email request on behalf of the signed-in user to unsubscribe from an email distribution list. Uses the information in the List-Unsubscribe header.
Message senders can use mailing lists in a user-friendly way by including an option for recipients to opt out. They can do so by specifying the List-Unsubscribe header in each message following RFC-2369.
Note In particular, for the unsubscribe action to work, the sender must specify mailto: and not URL-based unsubscribe information.
POST /users/{id | userPrincipalName}/messages/{id}/unsubscribe
This feature is only available in the beta version.
For more infromation: https://learn.microsoft.com/en-us/graph/api/message-unsubscribe?view=graph-rest-beta&tabs=http&viewFallbackFrom=graph-rest-1.0