This is my first cry for help on the forum so go easy on me.
I am currently attempting to read from a shared mailbox using the UiPath.MicrosoftOffice365.Activities.Mail.GetMail activity, which is of course nested inside an UiPath.MicrosoftOffice365.Activities.Office365ApplicationScope.
I am using Username Password authentication mode. I believe my scope properties are correct because if I try to read the Inbox from my own mailbox it works fine. Without making any changes except for adding the shared mailbox email address (in the form sharedmailbox@abc.xyz) to the âAccountâ property of GetMail (previously it was empty) I receive exception:
âMicrosoft.Graph.ServiceException: Code: ErrorFolderNotFoundâ with message âThe specified folder could not be found in the store.â
Keep in mind the âMail Folderâ still has the default value of âInboxâ. I do have access to this mailbox under my account and in Desktop Outlook I can read mail, send mailâŚall the normal permissions.
Any insight on this would be appreciated. I did not include the workflow file since I would need to remove most the fields for it be sensitized anyway.
This isnât a solution, but wanted to add on that Iâm experiencing a similar issue with using the Use Outlook 365 activity, where it seems to only find folders for the userâs account, and not in a shared inbox, even though Iâve both added the shared inbox in the activity, and confirmed the account has access to it.
Iâve just tested it with both UiPath.MicrosoftOffice365.Activities v1.11.1 and v1.12.1-preview and I successfully retrieved emails from the Inbox folder of my shared mailbox.
It the issue persists try the following:
In scope activity, make sure that Mail & Shared services are selected.
Delete the locally stored âoffice365.tokensâŚâ token file from %appdata%\UiPath\authentication
Run the workflow again.
P.S. One more sanity check: can you please use âSend Emailâ activity to send an email to your shared mailbox address, i.e. set To = same value you are using in Get Mailâs account field?
Thanks for you comments. I followed the steps and am still facing the same issue.
I am able to send mail to the mailbox, I can even send mail âon behalf ofâ this mailbox if I put the shared mailbox address in the âFromâ field of send mail activity.
I am starting to think there is a setting that needs to be changed on the mailbox itself
Hi @ovidiuponoran, I am also getting an error when trying to fetch emails after using the Office365 scope activity. This is for a shared mailbox that i have access to and i am receiving the message below - The âInboxâ Folder is the default one
My permissions are set below in Azure:
Mail.ReadWrite.Shared
Mail.Read
Mail.Read.Shared
Mail.Send.Shared
User.Read
Any other permissions that should be granted for this to work? They are all Delegated permissions.
It seems like the folder âInboxâ canât be found, please confirm that the wanted inbox folder actually is named âInboxâ. Depending on your language and cultural settings it may be different.
What type of Authentication are you using in Office 365 scope activity?
From Outlook Desktop / Outlook on the Web are you able to access the shared mailbox folders when you are connected with your user email account (which I assume is used when connecting with InteractiveToken) ?
Thank you for your reply. I am using Application ID and Secret - below are the permissions in Azure AD.
2. And yes, the shared mailbox appears under my user email account inbox since i am a member/owner.
Question regarding permissions: Did you have to provide admin permissions in Azure by any chance? Would you be able to provide a screenshot of your permissions that are working on your end?
When you are using applicationID and Secret you need to set application Graph API permissions for your registered Azure app instead of delegated permissions.
Hi Ovidiu, my organization does not allow for application API permissions on mailboxes, only delegated. Is there an Authentication type that i can use for Unattended bots and delegated permissions? The documentation you linked to likely needs to be updated to make sure there is no future confusion as it does not seem clear.
I am having same issue where I am unable to Read Emails from Shared Mailbox. I have tried a million things already. In terms of permissions on Azure App I have attached the screenshot. It seems for Shared Mailbox , Delegated permission is the only option. We cannot set application permission for Mail.Read.Shared. As per UiPath doc: âApplication ID and Secretâ does not work with Delegated permission. So I tried with Integrated Windows Auth, but get an error. Interactive Token is not an option for me as mine is an Unattended use case. UserName/Password does not follow modern authentication so thatâs not an option as well. Has anyone been able to Read Email from a Shared Mailbox successfully ? Its extremely frustrating to see something this simple is not working as expected.