SharePoint Graph API Issue

Hi all, i am using UiPath SharePoint activity to call Graph API to create a folder within a SharePoint library. facing an issue to declare connection to my desired SharePoint site.

Error Message
Code: BadRequest
Message: /me request is only valid with delegated authentication flow.
Inner error:
AdditionalData:
date: 2024-01-30T03:51:58
request-id: xxx
client-request-id: xxx
ClientRequestId: xxx

MicrosoftTeams-image (2)

I would like to perform the same test as done in UiPath but using Microsoft Graph Explorer. Can anyone help me with the endpoint for me to re-test the case. Thank you

Hello @Vivekaanan_Sirgunan Welcome to the UiPath Community Forum

The error happens when the session is established with oAuth2.0 workflow which will provide you “Bearer Token” for the session. If Token Scope and Permissions are good you should be good to go with fetching the SiteID → Parent Folder → on which you need to create the child folder.

This may be of some help;


Graph Documentation: MS Graph - Folder

Thanks

@Vivekaanan_Sirgunan

As per the error with the combination of authemtication type you used…you need delegated or user permissions to be given instead of application permisssions

Also sometimes we can see this when the optional account field is left blank in some activities

Cheers

For email activities - Get Mail, Forward Mail, Send Mail, and Move Email - it is mandatory to specify a value for the Account parameter.

Kindly provide value in the upload file activity property called account.

Image_2024-01-05_12-10-46.png

NOTE: Calling a /me request with Application + Secre t endpoint is not supported. That endpoint is only for users and not for Applications . You need to use a user to authenticate and not an application (Username and Password).

Reference: https://uipath-survey.secure.force.com/CaseView/articles/Knowledge/Outlook-activity-fails-because-request-is-only-valid-with-delegated-authentication-flow