Connecting to M365 Modern Activities

Hi All,

I am trying to update an SharePoint Excel file Online while other people are working on it already. (Without downloading it). So , I thought of using M365 Modern Activities ( Excel Online)
While I try to Add a Connection, I use the below Auth Method since we already have a App ID (That we used for Classic Activities)

When I searched through web, I see 2 problems while connecting.

  1. Graph API permissions ( I.e. Sites.ReadWrite.All)
  2. Site Owner has to grant access via appinv.aspx.

Can anyone confirm me if the above ones are resolved, Will I be able to establish a connection? Also, Once I get a connection, Can a Bot update an Excel Online when other people are working on it already?

Thanks in advance

@besakkiappan46,

As you have App id, secret, for now use Microsoft 365 Scope activity and configure your app id secret like you used for classic.

Inside it you can use modern activities also.

Yes, you will be able to read write the file even it’s opened by other users. Just remember, you can’t replace the file when opened by another user. This is the only thing I observed. Rest every operations works flawlessly.

2 Likes

@besakkiappan46

Did you provide the impersonate user?

Also minimum scope needed is this

As per error looks like the impersonate user is the issue

Also if you want to connect to your oen app then you need to use bring your own app with delagated..please check here

Cheers

2 Likes

Hi @besakkiappan46

Pls check below link,

Happy Automation
SharePoint Custom Activities Documentation.pdf (2.8 MB)

2 Likes

Thanks @Anil_G

I used this Option ‘OAuth 2.0 Client credentials’ for Auth Type since We already have App ID and Secrets. In the Screenshot, You Could see ‘Account’ field. Where I had to give my Bot Email ID. Not sure whether that is correct. It is a mandate field and I cannot skip. So, I had to impersonate the User.

Also, I tried ‘Bring your own App’ . I provided the Client ID and secret.
It asks me to sign in to an Email ID. I provided Bot account. I get the below error.

Application ‘xxxxxxxx’(UiPath RPA - Graph API) is not configured as a multi-tenant application. Usage of the /common endpoint is not supported for such applications created after ‘10/15/2018’. Use a tenant-specific endpoint or configure the application to be multi-tenant.

Should I go for ‘OAuth 2.0 Client credentials’ or ‘Bring your own Oauth App’ for my scenario?

2 Likes

Thanks @ashokkarale
I tried like you mentioned. It asks for a Connection ID when I put the activity inside the Scope. What is this Connection ID? I see it under Scope Property as well.

2 Likes

Thanks @prashant1603765
But the above link is for Outlook 365 and PDF is for Classic Activities to generate the App ID I guess.

2 Likes

@besakkiappan46

Foes the bot id has same level of access ?

As you see the impersonate user should have same level of access there

Ideally which ever email is given it would be used as the user group

If using scope from properties select oauth authentication type

Cheers

2 Likes

I am unclear here a bit @Anil_G
Which approach I should go with?
Should I need to use Scope under which you want me include Modern Activities (Excel Online activities) ?
Or I should establish a connection first? If establishing a connection is the Option, We have 2 Auth Types to choose from ‘OAuth 2.0 Client credentials’ (403 Forbidden Error) or ‘Bring your own Oauth App’ (Not configured as Multi-tenant).
For both Options I get different Errors.
So, You would want me to ensure the Bot ID has access to the SharePoint site? - I am not providing any Urls while establishing a Connection right. So why the Bot Id should need access for the Site ?

1 Like

@besakkiappan46

  1. First check with your admin if your own app is create or we can use client id and secret to connect..as per error looks like bring your own app might not work for you because of the way your azure app is setup..also byoa needs delegated permissions not application
  2. Scope can be tried as you already have used scope and it is working try with scope ..in scope go to properties and select authentication type ..currently it might be selected as integration service clickt he dropdown and select oauth

Cheers

1 Like

@Anil_G
The existing App IDs we have are working fine for Classic Activities under the Scope. If I try to put in Read Range (Modern M365 activity) inside it, It asks for a connection ID. Connection ID is one of the properties under Scope.
Also, I see below Options for Authentication Type.
Even If I select any of the Options from the dropdown, I would still need a connection ID to use Read Range Activity right?

@besakkiappan46

Whenever you use acope you need to use the classic activity ..there is a read ramge under classic as well

Also in integration services can you try giving your username instead of bot ID and check please..also you need to let your admin know to give access to the specified email id or bot id ..in azure app restriction at email id is also possible so that might be the issue that you are facing

Cheers

Thanks @Anil_G
Does Classic Read Range Activity works for my scenario? I need to update my SharePoint Excel Online while other people have kept it Open or when they do some updates to other columns with Interfering with the Columns that the Bot updates.

@besakkiappan46

both work the same way and same API …just the auth types are different and modern are compatible with cross platform and classic are not…

cheers

1 Like

“Currently, Integration Service only supports Delegated authentication flows. Application auth flows are in the works, but I don’t yet have a timeline on completion” - This was aug 28 2024 by UiPath ticket.

If you’re using Integration Service to connect to Office 365, I believe it’s currently only supported with user-based login. That means App ID and Secret authentication (like in the classic setup) isn’t supported yet.

I tried upgrading to the new activities and was told this directly by UiPath.