python-o365
python-o365 copied to clipboard
How to obtain the authenticated user email?
Have I read the documentation too fast, or there is no way to obtain the email address from the Account()
object? I see the get_current_user()
method, but it only provides the name.
This is not central, has messages can be sent without it, but it would be a natural "nice to have".
(Don't get me wrong: I'm a big fan of your library! It is very useful to build connectors.)
Edit: it can be found with a bit of tweaking:
user = account.get_current_user()
user.__dict__["mail']
user.mail
should work.....