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 :
Finance | Project Operations, Human Resources, ...
Unanswered

Using Docu::fileExists() method getting access error

(3) ShareShare
ReportReport
Posted on by 102
Hi, I am using Docu::fileExists(DocuStorageProviderType::SharePoint,URL,_filename) method to check the file exist in SharePoint or not in X++ but getting not authorized error as i have only access of particular folder not full root SharePoint URL. how to fix this ?
 
Or i can use any other method place of this to get validate if filename is available in SharePoint or not?? 
 
I have the same question (0)
  • Ramesh Kumar Profile Picture
    7,529 Super User 2025 Season 2 on at
    Ensure you are specifying the correct folder path in your Docu::fileExists method. If that doesn't solve the issue, you can use SharePoint REST API or Microsoft Graph API to check if the file exists. Use HTTP requests in X++ to make API calls to SharePoint or Microsoft Graph, ensuring proper error handling.
     
    Thanks
    Ramesh
     
    If this was helpful, please check the "Does this answer your question?" box and mark it as verified.
  • Martin Dráb Profile Picture
    238,050 Most Valuable Professional on at
    I don't think that the error message means that you must have access to the root. It means that you can't access the file.
  • CU19031442-0 Profile Picture
    102 on at
    @Martin Dráb but I can directly access the file through URL on browser. Just getting through this method only  
  • André Arnaud de Calavon Profile Picture
    301,352 Super User 2025 Season 2 on at
    Hi,

    Have you checked what user account is executing the coding at runtime?

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

News and Announcements

Season of Giving Solutions is Here!

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Abhilash Warrier Profile Picture

Abhilash Warrier 678 Super User 2025 Season 2

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 407 Super User 2025 Season 2

#3
Martin Dráb Profile Picture

Martin Dráb 283 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans