Office 365 scope and multiple OneDrives

Has anyone used Office 365 scope to connect to different OneDrive accounts instead of one locally mapped OneDrive account?

Hi @shoba.mallik

If I understand it correctly, it should be possible, given 1 scope = 1 account. It shouldn’t be a problem to have more than 1 Microsoft Office 365 Scope activity per process.

Hi @shoba.mallik,
Not sure what would you like to achieve. Each Office 365 scope requires it’s token generated for the account. So if you have token for more than one account you could achieve it.

Hi there, apologies for not being clear. I am using integrated windows authentication and I need to parse through files on a dept account. When I run the automation, scope is not able to find the folder or file unless it’s owned by me. Is there a specific setting I am not using? Scope is not able to find any shared folders or file either

Hi there, maybe that is the issue. I am using windows integrated automation. Do I ask the administrator to give me a token? Can you give me a bit more direction on how I would go about getting the token?

Yes, that’s the case.

Hopefully our documentation is extensive enough about this topic :slight_smile:

Thank you! I did read that and of course, I focused on windows authentication :smiley:. I will read up on the token. Any thoughts on shared files? Is there anything diff I need to set on the subfolder? I am defn not able to access shared files on OneDrive even when it’s working on my account. I am not sure where I am going wrong.

Hopefully, this one will help?

It looks like you should be able to specify what you are after:

Hi, I read through the ‘token’ option and its viable only for Attended robot. Mine will be an unattended one. So, what are my other options if I need to connect to a dept owned account?

Hello @shoba.mallik,

Which version of Office365 activity are you using?

Hi Mihai, I am on V1.2.0

Can you please create a copy of your project, update it to 1.4.0, try running it and let us know what happens?

Oh, I am so sorry! I am on 1.4.0. My bad.

No worries! You should run whichever version you want! Can you let me know what happens with the process now?

If i am not mistaken, we might be lacking the capability to read files shared across different tenants. Waiting to see what happens with your process now!

Hi Mihai
Azure is single tenant and the support account type is set to ‘Accounts in this org directory only’. I have received the app id and tenant id from my Azure team and have them as the input in the MS O 365 scope activity. I have also set the unattended section filled out as below. The user id is valid in Azure and have confirmed it. I have also been able to login to OneDrive as that user. Hope that gives you a bit more clarity.


And here is the error


Hi @shoba.mallik,

Is this error the same as in the 1.2.0 version of the package, which you used before, or has it changed?

By the way, i see you are doing UserPass.ToString in the Password field. Is the Password perchance obtained from an Orchestrator asset, aka, is it of type SecureString?
If so, please use this in the Password input field:
new System.Net.NetworkCredential(string.Empty, UserPass).Password

Hi Mihai, UserPass is the password which I get from the orchestrator. Thanks for the pointer! I have made the change. Does that type make the input string secure?

The SecureString type helps with certain accidental prints of the password.
The way to transform a SecureString to a string is what i pasted, it does not work to simply write ToString.

Does your workflow work now?

By the way, in the next release, we are adding a new SecurePassword field which is a SecureString, so you can simply put the resulting SecureString password in that field without the need to transform it!

Hi Mihai, I have been in touch with UiPath tech support also. I have been told that Username/Password is not an option for Azure users and they have been able to replicate the error. I have been asked to use ‘Integratedwithwindows’ or ‘ApplicationIdandSecret’. I have not had success with ‘Integratedwithwindows’ since the while the user id is an Azure AD id, it will not be a valid ‘login’ user on VM. So, not sure how to proceed to at this time. I need to look into the ‘ApplicationIdandSecret’.