Hello Yang Liu,
Thank you for reaching out to Microsoft Support!
After our tests, the endpoint works well, and the test results are as follows:
For your error code 403, it may be the lack of token permissions, but what you show in the screenshot is not the permissions that have been granted to the application, the permissions that have been granted to the application are as follows:
To use get Mail attachments, the permission you must add is Mail.Read. Check if you have this permission in the token. You can parse the token using jwt.ms to check if Mail.Read is in the roles attribute.
Reference document:
https://learn.microsoft.com/en-us/graph/api/message-list-attachments?view=graph-rest-1.0&tabs=http
Hope this helps.
If the answer is helpful, please click Accept Answer and kindly upvote it. If you have any further questions about this answer, please click Comment.