Access SharePoint and set up Authentication

Hi all, our team is transitioning to use SharePoint. I have a question re the same:

I understand I need to set up Microsoft 365 Azure app. I am planning to develop this process on an attended bot so I’m assuming I would use the bot’s azure account.

a.In future I need to move this process to an unattended bot. Would I then need to set up
another app using that account or the client ID and tenant Id from the first would work?

b. Also, would I need to change authentication method and when the unattended bot is running
would it be able to establish connection and perform activities based on first account?

c.Is there anything else I should think of?

I’ll really appreciate if someone can please comment on the same.

Best Regards

Hi @Anived_Mishra,

Yes it will use bot’s user id.

No need of another application. Same application will work.

For unattended use this Authentication type: Application ID and Secret
Here are more details on it: Activities - Microsoft 365 Scope

Rest everything you are already taking care of. Good luck :slight_smile:

Ashok :slight_smile:

Hi @ashokkarale , thank you for your response. Please see attached images. Confirming in image 1 that’s the App ID and Tenant ID i need to use and client secret would be the value? I saved App Id and Client secret in Orchestrator as credential asset so return of password i.e. Client secret would be secure string for me to input. Please see attached image 2. When I tried to run and find the folder in SharePoint to download a file, I got a message saying bad request and is only valid with delegated authentication flow. In above 3 statements, is anything wrong and how can I retrieve the file in SharePoint? The machine I am running it on is a member of that group in SharePoint whose file I am trying to access.

Please advise.

Best Regards
Anived Mishra

Correct. Only these 3 things would be required. Also make sure you followed this setup guide because it provides all things to setup correctly. Activities - Set up your Microsoft 365 Azure app

Make sure you are converting it to string. I don’t think SecureString will work.

Ashok :slight_smile:

You can use the C# code to solve this

A bot is an account. Whatever network user you’re using as the robot account, you grant it access to Azure. You don’t do the Azure setup as the bot account. The bot account doesn’t “own” Azure.

Hey, thanks for the response. I tried using Value in Application secret as a string, it did not work still. These screenshots are when I tried using converting it to secure string and I gave permissions I am not able to read email off a mailbox as it says can’t authenticate. I can’t set up the azure bit myself due to restricted access so IT has done that for me. We are using urn:ietf:wg:oauth:2.0:oob as the redirect URL so not sure if that is having any impact says redirect URL is optional

Closing this one as I was able to sync SharePoint to One drive and access the file then.

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