I’m trying to use Office365 dependency to send emails, but i’m not able i don’t know why. I have no control over Azure configurations, but the team in charge of that actions has followed next steps:
We have granted rights over mails, users, files, offline_access, etc.
We have generated a secret value, to use while connecting to Office365.
The robotic user is owner of the application
While executing a very simple sequence (only Office365 scope and send mail) i’m getting this error:
If i execute the same sequence, without send file activitiy, it works, so it has to be something related to rights over the application or any other setup that is missing. Has anyone faced this error? Is it needed any other extra steps not described in the uipath guide?
Any idea is welcomed. Let me know if you need to know any other specific information, but keep in mind that because of NDA i won’t be able to share too much information.
I’m using ApplicationIdAndSecret and MFA is disabled.
I have some doubts about the matrix you are sending me. It is supposed that i cannot run my flow until i deployed it and test it in unattended mode? To run a workflow with Studio, i have to use ‘InteractiveToken’ authentication?
Only running office 365 scope will not confirm that the details are correct. Even if you give A B and C in your appID secret and Tenant ID it would still run with out throwing error.
The scope gets executed only when there is an activity inside it
So Please cross verify the same
And do one thing… Run the bot in debug mode and when you get the error open the locals panel and check the inner exception details that might give more information on why the access is denied
Alternately instead of application secret can you try using username and password .We are actually using integrated or username and password and never faced an issue
I’m Alvaro’s teammate, we have executed the code again and this is the information provided in the exception:
RemoteException wrapping Microsoft.Graph.ServiceException: Code: ErrorAccessDenied
Message: Access is denied. Check credentials and try again.
ClientRequestId: a358a72b-6a81-48d8-b030-1349c88fa180
at Microsoft.Graph.SimpleHttpProvider.d__10.MoveNext()
— End of stack trace from previous location where exception was thrown —
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.Graph.BaseRequest.d__40.MoveNext()
— End of stack trace from previous location where exception was thrown —
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.Graph.BaseRequest.d__34`1.MoveNext()
— End of stack trace from previous location where exception was thrown —
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at UiPath.Shared.Services.Graph.Mail.Extensions.GraphServiceClientExtensions.d__36.MoveNext()
— End of stack trace from previous location where exception was thrown —
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at UiPath.Shared.Services.Graph.Mail.Extensions.GraphServiceClientExtensions.d__22.MoveNext()
— End of stack trace from previous location where exception was thrown —
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at UiPath.MicrosoftOffice365.Services.GraphServiceClientProxy.d__45.MoveNext()
— End of stack trace from previous location where exception was thrown —
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
at UiPath.MicrosoftOffice365.Activities.Mail.SendMail.d__54.MoveNext()
— End of stack trace from previous location where exception was thrown —
at UiPath.Shared.Activities.AsyncTaskCodeActivityImplementation.EndExecute(AsyncCodeActivityContext context, IAsyncResult result)
at UiPath.Shared.Activities.AsyncTaskCodeActivity.EndExecute(AsyncCodeActivityContext context, IAsyncResult result)
at System.Activities.AsyncCodeActivity.System.Activities.IAsyncCodeActivity.FinishExecution(AsyncCodeActivityContext context, IAsyncResult result)
at System.Activities.AsyncCodeActivity.CompleteAsyncCodeActivityData.CompleteAsyncCodeActivityWorkItem.Execute(ActivityExecutor executor, BookmarkManager bookmarkManager)
The thing here is, if we use user and password, are we solving the issue with ‘Basic Authentication’ deprecation?
It is supposed that we have to use AppIdAndSecret or certificate.
Moreover, client’s IT department required us to use AppIdAndSecret, so we need to solve it by this way.
I believe they changed the permissions from delegated to application permissions. Really bad that I couldn’t see that till now when I skimmed through the screenshots again. Anyways happy that its resolved