I developed an Azure Function that is copying files from Sharepoint to Teams via Graph API.
In my development Tenant, the Azure Function works fine but when I deploy it in my customer tenant, the file copy fails.
In Azure AD, I registered an application with Sites.ReadWrite.All
. The AppID/Secrets are used to authenticating the API call.
My call is :
POST /drives/b!LbotXZhkxke94OcM0YXrwjR86upNLJdLhSZ_OgDp-T-mtydXTv3sT5A00CrdeZV3/items/01XH5SRTDWNAGSEI66J5GZZXQ6J3NX5KBY/copy
{
"parentReference": {
"driveId": "b!mYnVUTiLdES_vJKviIRhfBS6yvSHBD5Bkm3MUTeSBz0DLlyWwF6ORIRel-MFHkAv",
"id": "01B7MS37LA35AKR6UYIBDJW3QA5DFVCCZJ"
}
}
The response status is accepted
but the files are not copied.
The location
response header value is correct, but when I browse to the location
URL, I have the message "General exception while processing".
The source files exist and the destination drive exists. If I make this API call in the Graph API Explorer, the files are copied.