Using O365 image in user's avatar

Good morning,

I’m using Gitea and I created an Authentication Source using Active Directory. Is there a way to use the imagethe user has in O365 (I don’t know if the photo is in AD) to replace the avatar that Gitea creates?

Maybe using OAuth to authenticate/authorize to O365 portal… But I don’t know how to proceed.

Thank you so much,