Read email through Microsoft office 365 activities

What I found is after administrative consent was applied for my app registration in Azure, user consent was STILL required.

Your workaround is pretty much what I did. What I found is the Administrator Consent is required at the 365 Scope activity. The User Consent triggers on the operation activity … say Get Mail.

I faced same issue a year ago. I remember there was an issue in UiPath. we have to pass empty array in Attachments field (Properties pane)
Attachments = {}
Hope it works!

Can you send xaml file where everything is incorporated

Does anyone have any updates to this topic? I’m trying to get Unattended access working with v1.5.0 of the UIPath.MicrosoftOffice365.Activities. InteractiveToken works fine (attended), but I can’t get UsernameAndPassword to work. To me, it looks like the issue is that even in InteractiveToken mode I am never prompted for consent on the “Azure AD app” we added in the setup. I was prompted for UIPathStudioO365App which I accept and that permission then shows up in my Microsoft account. Our Azure admin added the global admin consent as described in the Microsoft article, but it still isn’t working for me. The error with UsernameAndPassword is “RemoteException wrapping Microsoft.Identity.Client.MsalUiRequiredException: AADSTS65001: The user or administrator has not consented to use the application with ID ‘’ named ‘office365UiPath’. Send an interactive authorization request for this user and resource.”

Did you get the UserNamePassword method to work? I am having the same but getting a different error:
Code: generalException
Message: An error occurred sending the request.

Also UserNamePassword follows basic authentication, and Microsoft is deprecating Basic auth from 01st Oct 2022. So this option will not work either. UiPath should have something else to GetMails from Shared Mailbox for Unattended Robots.