Skip to main content

Notifications

Announcements

No record found.

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.

  • Verified answer
    Sergei Minozhenko Profile Picture
    23,091 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

Daivat Vartak – Community Spotlight

We are honored to recognize Daivat Vartak as our March 2025 Community…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Kudos to the February Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 293,020 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,837 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156 Moderator

Leaderboard

Product updates

Dynamics 365 release plans