web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / DELETE FILE ACCESS DEN...
Power Automate
Suggested Answer

DELETE FILE ACCESS DENIED WITH CLOUD FLOW

(1) ShareShare
ReportReport
Posted on by 6
PLEASE HELPME
 
I am trying to delete a file with event trigger when creating a file in sharepoint, the file should be deleted if it is rejected, but I get access denied, i go it this:
 
 
{
    "statusCode": 403,
    "headers": {
        "Cache-Control": "no-store, no-cache",
        "Pragma": "no-cache",
        "Set-Cookie": "ARRAffinity=18ffbb6bc42e6a8947719b4904cdb240a479c70cd565ecfce265809dd3032f9a;Path=/;HttpOnly;Secure;Domain=sharepointonline-cus.azconn-cus-001.p.azurewebsites.net,ARRAffinitySameSite=18ffbb6bc42e6a8947719b4904cdb240a479c70cd565ecfce265809dd3032f9a;Path=/;HttpOnly;SameSite=None;Secure;Domain=sharepointonline-cus.azconn-cus-001.p.azurewebsites.net",
        "Strict-Transport-Security": "max-age=31536000; includeSubDomains",
        "x-ms-request-id": "ab6b42a1-508e-5000-fd8d-809f8211d243;ab6b42a1-3092-5000-fd8d-8fff8f28a2d8",
        "X-Content-Type-Options": "nosniff",
        "X-Frame-Options": "DENY",
        "Timing-Allow-Origin": "*",
        "x-ms-apihub-cached-response": "true",
        "x-ms-apihub-obo": "false",
        "Date": "Fri, 02 Aug 2024 19:25:27 GMT",
        "Content-Length": "707",
        "Content-Type": "application/json",
        "Expires": "-1"
    },
    "body": {
        "status": 403,
        "message": "Acceso denegado.\r\nclientRequestId: 314862d3-7c67-4a95-8909-603f6ad9e6b4\r\nserviceRequestId: ab6b42a1-508e-5000-fd8d-809f8211d243;ab6b42a1-3092-5000-fd8d-8fff8f28a2d8",
        "source": "https://bucaramangagovco.sharepoint.com/sites/portal-calidad-salud-ambiente/_api/web/GetFileByServerRelativePath(decodedUrl=@p)/Recycle?@p='%2fsites%2fportal-calidad-salud-ambiente%2fhttps%3a%2f%2fbucaramangagovco.sharepoint.com%2fsites%2fportal-calidad-salud-ambiente%2fAPROBACIONES%2fFICHAS-TECNICAS%2fFORMATO+DE+FICHA+T%C3%89CNICA+ACTIVIDADES+SSAB+(2).xlsx%3fd%3dw51883885a8e0452d99bd36839f0bd632'",
        "errors": [
            "-2147024891",
            "System.UnauthorizedAccessException"
        ]
    }
}
 
I must say that I am the owner of the flow connection but the one who approves is another person who is within the domain
 
this is the data entrance
 
{
    "host": {
        "connectionReferenceName": "shared_sharepointonline",
        "operationId": "DeleteFile"
    },
    "parameters": {
        "dataset": "https://bucaramangagovco.sharepoint.com/sites/portal-calidad-salud-ambiente",
        "id": "https%3A%2F%2Fbucaramangagovco.sharepoint.com%2Fsites%2Fportal-calidad-salud-ambiente%2FAPROBACIONES%2FFICHAS-TECNICAS%2FFORMATO%2520DE%2520FICHA%2520T%25C3%2589CNICA%2520ACTIVIDADES%2520SSAB%2520%282%29.xlsx%3Fd%3Dw1c7814a63e5145fb8bdfa16ec4f2fc5b"
    }
}
 
 
 
 
Categories:
I have the same question (0)
  • Suggested answer
    Michael E. Gernaey Profile Picture
    53,493 Super User 2025 Season 2 on at
    Hi
     
    This is a permission issue. So you need to look at the SharePoint location and its Parents (if it inherits its permissions) and verify WHO the Action is running as (dont care so much at the flow level), because the connection could belong to someone else.
     
    If this is 100% reproable with everyone, did it every work for you?
     
    if the answer is no, fix the permissions on the Site, as the connection action doesn't have permission, based on who it runs as. Its honestly that simple
  • OR-02081929-0 Profile Picture
    6 on at
    ok I understand but, the person who performs the action is someone who is in a sharepoint group with the profile that can edit, also checking the folder where the file to be deleted is also has these permissions that is not enough ?
     
     
     
    I have also reviewed the permissions of the file to be deleted and they have the same permissions as the folder, the only thing different is that I am the one who uploads the file but the one who performs the action in the cloud flow deletes it.
     
     
     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 519 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 296 Moderator

#3
abm abm Profile Picture

abm abm 232 Most Valuable Professional

Last 30 days Overall leaderboard