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

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Answered

Folder permission for downloading file through x++ code

(0) ShareShare
ReportReport
Posted on by 240

I am using the methods below in my AIF service class to download a file on the server. 

new FileIOPermission(downloadsDir, "rw").assert();


webClient = new System.Net.WebClient();

webClient.DownloadFile(filePath, downloadedFile);

I have successfully able to download the file in a folder which is accessible to "everyone" and the owner name of downloaded file is showing as AOS service account user. 

So my question is that if I need to download the file in a folder with limited rights, I would only need to give permission to AOS user or all the users calling the service would also need permission for the folder.

I have the same question (0)
  • Verified answer
    Sergei Minozhenko Profile Picture
    23,093 on at
    RE: Folder permission for downloading file through x++ code

    Hi Hassan,

    If you are planning only to run your code only on the server-side, it's enough to give access only to AOS user. Otherwise, each user who will run the operation should have access to the folder.

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

Responsible AI policies

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

Andrés Arias – Community Spotlight

We are honored to recognize Andrés Arias as our Community Spotlight honoree for…

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

#1
CA Neeraj Kumar Profile Picture

CA Neeraj Kumar 1,140

#2
André Arnaud de Calavon Profile Picture

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

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 706 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans