Microsoft Office 365 Scope activity and Sharepoint

Hi,

I’m trying to use the “Find Files And Folders” to access documents in a Sharepoint Site.

image

Unfortunately, the activity returns the following error:

Microsoft.Identity.Client.MsalServiceException: AADSTS1002012: The provided value for scope Sites.Read.All is not valid. Client credential flows must have a scope value with /.default suffixed to the resource identifier (application ID URI). Trace ID: cc72eaa6-c7e5-472b-8812-79759b801f00 Correlation ID: af759732-905f-42c5-b318-027f97c16f63 Timestamp: 2023-11-02 23:09:32Z at Microsoft.Identity.Client.Internal.Requests.RequestBase.HandleTokenRefreshErrorAsync(MsalServiceException e, MsalAccessTokenCacheItem cachedAccessTokenItem)

I’m using the UiPath.MicrosoftOffice365.Activities version 2.4.3. My Studio is in version 2023.10.0
For the authentication, I use “Application ID and Secret”.

image

The app has been registered with the following permissions and we tried with more permissions (app and delegate):

I tried the activity “Get Mail” that I use in another project. I’ve got the same error when I use the last version of 365 activity while it works with an older version (2.2.7). Unfortunately the older version doesn’t work for Sharepoint either.

Does anyone experience the same issue and found a solution?

Thank you
Greg

1 Like

@Gregusse

Ideally client id secret works with application scope can you try to give the same and check

Cheers

Hi,

Sorry but where can I change to “Application scope”. Do you mean in Azure or in UiPath?

Thank you

@Gregusse

In azure

Cheers

I made it works by using the version 2.3.3 of the office 365 scope instead of the 2.4.3. I could select the service where I can’t in the last version.

image

Is it a bug with version 2.4.3?

1 Like

@Gregusse

Ideally you should be able to select the service in office 365 scope…if its not visible then yes it migth be a bug or an enhancement to use over all scope…if its either of them there needs to be a correction in future

Glad you were able to resolve it

Happy Automation

Cheers

Thank you for your help

1 Like

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