Upload of file / crreation of workbook failing with Upload File: Code: BadRequest Message: /me request is only valid with delegated authentication flow

Hello,
I use application ID and secret to connect to M365. I use package version 6.21. in a windows-legacy project. Activities such as creating folders, downloading files, etc. work fine.

However, I get an error when uploading/creating a new file/workbook:
Upload File: Code: BadRequest
Message: /me request is only valid with delegated authentication flow.

In the upload file activity, I am supposed to fill in the account (" * Account - The ID or User Principal Name for the user who owns the OneDrive. This parameter must be set for ApplicationIdAndSecret and ApplicationIdAndCertificate authentication types."). What account is this supposed to be?

Hi @michael00,

In case if application is and secret auth type, this account is “tenant id” or some people also called it “realm”

You should have received that also from your admin.

Regards
Sonali

Hi @sonaliaggarwal47 ,
thanks for the hint. I entered the tenant ID (the one I also used in the Excel scope . I get a new error message now:
Upload File: Code: ResourceNotFound
Message: User’s mysite not found.

Do you have any idea what this is about?

Thanks,
Michael

@michael00

as per error the site or the folder you are trying to use is not found

cheers

You are right, my bad. Using tenant ID solved my issue.
Thanks!

1 Like

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