O365 scope requires authentication on every scope

Hello,

I have noticed an issue with the latest version of the Microsoft Office 365 Scope activity. When authenticating via interactive token, the login prompt for the email in use appears every time the activity runs, even if the email address and all other properties are the same. It even requires it within a retry scope if it fails for something other than authentication.

The next package version I have found that does not require authentication every time is 1.14.1, and downgrading from anything above 2.0.1 to 1.14.1 removes the activities used.

Has anyone else faced this issue? Does anyone know if other authentication types have this issue?

Hi @william.coulson
I your process is intended to run unattended you should use Application ID and Secret authentication type

Hi @dokumentor,

Thanks for the response, we have used Application ID an Secret for a handful of logins on attended and unattended processes, the issue with this is that we send emails from external domains and we have to generate this information from their Azure directory.

My question still stands however, I thought that the idea of Interactive Token is that you sign in once, and then it remembers the credentials. All packages after 1.14.1 the sign in is required every time the Scope activity is ran.

Hi,

Please share your O365 scope properties:

image

Set your OAuth Type Application as UiPath, it should not ask for login everytime.

Thanks.

Hi @prateek.mehandiratta9,

Please see below my Send Mail and O365 Scope properties of a test activity I made. I ran this twice from a VM attended, and it requested authentication twice each time it ran: I assume one for the scope and one for the send mail.


Edit: I just made the same set of activities in 1.14.1 with the same properties and it required authentication for the first run, and not for the 2nd and 3rd runs.

Hey,

You are using App ID and Tenant ID, right? Because in the properties i see that missing
Also, if you leave Account property as blank, it would automatically take current user account.
Can you try this combo.

Thanks

Yes I can try this, but I think you’re missing the point. My initial question was “why do I need to authenticate every time with interactive token on the latest O365 packages” and while authenticating with app/tenant ID is another way of authenticating, my question related specifically to interactive token.

The context to my question is because we often send emails from our client’s email domains, and we don’t have access to the app/tenant IDs for all of the emails we send from. When running through the O365 activities on a package version higher than 1.14.1 with the emails that require interactive token authentication require authentication every time. This is not an issue on package version 1.14.1, and I believe there is an issue with the newer versions of the packages.

@william.coulson,

I’ve raised a bug to investigate your situation and we will come back.

Meanwhile, my suggestion is to try to use the new Activities that are requiring Connections and Integration Service. These will use the Interactiv Token and Integration Service will take care of keeping the Authentication and the refresh token.

There are many many advantages of this new approach, I will mention just a few of them:

  1. A better security as the RPA Developer never gets the credentials but rather just the Auth Token.
  2. Credentials are stored in a separate Central Service
  3. Interactive Token works for Unattended as well.
  4. You grant the approval once, and it works on all the robots regardless Attended or Unattended
  5. Many new features added + a better UX
  6. Triggers such as Email Received or Email Sent
  7. Very easy way to separate Development Credentials from Production Credentials.

I’m stuck on 1.14.1 as well with my current onpremises deployment. Interactive Token has been working fine for quite some time until recently where after a few unattended runs over a few days, it’ll prompt for login again when the password hasn’t changed at all. The Prompt breaks the unattended process. We’ve also tried using App ID and Secret method to make it really unattended but we get access denied issues still. The Application level permission we granted in the Azure App is Sites.Selected configured by the SharePoint Admin. We can’t grant the azure app Sites.ReadWrite.All since that would make the single app access every site in the SharePoint when we just need it to write into one specific site.

Was there any responses back from support Alex? Thanks!

Hi @AlexCrijman,

Any updates on the bug report?

Myself and some colleagues have now started facing issues with the 1.14.1 version of the Office 365 package, across multiple processes/environments. The error we are facing is:
Status Code: NotFound Microsoft.Graph.ServiceException: Code: ErrorItemNotFound Message: The specified object was not found in the store. ClientRequestId: 3cd847f9* at System.Activities.Statements.Throw.Execute(CodeActivityContext context) at System.Activities.CodeActivity.InternalExecute(ActivityInstance instance, ActivityExecutor executor, BookmarkManager bookmarkManager) at System.Activities.Runtime.ActivityExecutor.ExecuteActivityWorkItem.ExecuteBody(ActivityExecutor executor, BookmarkManager bookmarkManager, Location resultLocation)

Do you know where this error may be coming from? We are in the process of testing newer versions of the O365 package however we still need to be able to use InteractiveToken as an authentication method.

Edit: We have noticed it only has an error if the email has more than 1 attachment.

One of my colleagues found a solution through some trial and error, with version 2.4.3 of the package.

If you leave the authentication method as InteractiveToken, and then copy the value from the Username property to the OAuth2User property, this uses the account specified in the Username field without needing to authenticate every time a Scope activity triggers.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.

@william.coulson and @Shawnaby,

This issue is a known issue, and it is something that Microsoft changed in the Graph without mentioning or a bug solved, we don’t know exactly. What we’ve seen is that this issue doesn’t replicate in the newer O365 package versions as we made some improvements since 1.14.1.

Our suggestion is to use the new activities with Connections whenever you can as they have the recent development. Let me know if using the new activities solves your issues.

Status Code: NotFound Microsoft.Graph.ServiceException: Code: ErrorItemNotFound Message: The specified object was not found in the store.