-
-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding attachment >3 MB not possible if no client secret is used #55
Comments
Try using PS 7, it should provide better error reporting. Also do you have proper rights to upload files? As ReadWrite Emails? Send is not enough. |
You don't have to reinstall module. Just to clarify:
|
And I assume in all cases the mailbox does exists? The one you're sending it with? |
Correct. (It's the always the same mailbox and I also tried it with a different one, but the error is the same.) |
I'm now using the following workaround without the need for a client secret:
|
Hi,
maybe it's a bug, but I'm unable to send attachments which are bigger than 3 MB via a managed identity or a normal app registration with certificate based authentication.
After creating a client secret for the same app registration it worked. (But I don't want to use a client secret.)
Is it possible, that the function which handles the upload somehow doesn't use the already existing session?
Because the upload doesn't work, but the email is send without problems (and without an attachment of course).
I used the following commands:
Connect-MgGraph -Identity
or
Connect-MgGraph -ClientId $ClientId -TenantId $TenantId -CertificateThumbprint $Thumbprint
Send-EmailMessage -From 'XXX' -To 'XXX' -HTML "XXX" -Subject 'XXX' -Graph -ReplyTo "XXX" -MgGraphRequest -Attachment "C:\temp\XXX.pdf" -Verbose
(By using the parameter -Credential and the function ConvertTo-GraphCredential for generating the credential object and removing the parameter -MgGraphRequest it worked.)
Thanks,
Markus
The text was updated successfully, but these errors were encountered: