You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In an app with Application permissions and credentials flow, I have Mail.Send.Shared permission. I want to send an email with the Send As mode. I mean, I have a shared mail box and I want to send an email from this mail box and I have another user with the permission to do that. Is it possible with python-0365?
I have tried that way:
credentials = (client_id, client_secret)
account = Account(credentials=credentials, auth_flow_type='credentials', tenant_id=tenant_id,
main_resource='user@my_company.com')
if not account.is_authenticated:
ok_auth = account.authenticate()
if ok_auth:
print('Authenticated!')
if account.is_authenticated:
message: Message = account.new_message()
message.sender.address = 'shared_mailbox@my_company.com'
message.to.add('another_user@my_compnay.com')
message.subject = 'example subject'
message.body = 'example message'
message.send()
In an app with Application permissions and credentials flow, I have Mail.Send.Shared permission. I want to send an email with the Send As mode. I mean, I have a shared mail box and I want to send an email from this mail box and I have another user with the permission to do that. Is it possible with python-0365?
I have tried that way:
And I'm getting this error:
Client Error: 401 Client Error: Unauthorized for url: https://graph.microsoft.com/v1.0/users/user@my_company.com/sendMail | Error Message: The token contains no permissions, or permissions can not be understood.
The text was updated successfully, but these errors were encountered: