Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.

Reply
Anonymous
Not applicable

Failure writing file XXX : An impersonation error occurred using the security context of the current

I created a subscription to a paginated report on Power BI Report Server with the following requirement : 

Automatic Excel file that will be delivered to a Windows File Share  like below : 

ManInBlack_0-1697638836685.png

 

ManInBlack_1-1697638861277.png

I get this error : 

Failure writing file XXX Automatic Extract.xlsx : An impersonation error occurred using the security context of the current user.

TestAB is my username should I use the email instead or what ?

1 ACCEPTED SOLUTION
AmiraBedh
Super User
Super User

I think the Windows File Share folder where the report is being saved doesn't have the appropriate permissions for the account under which the Power BI Report Server service is running. You need to grant read and write permissions to that account.

 

To explain to you the situation in Power BI Report Server, there are settings related to impersonation. These settings determine under which account the reports are executed and delivered. You should check the following settings:

  • Service Account: the Power BI Report Server service is running under an account must have the permission to write to the specified file share

  • Data Source Impersonation: If your report uses a data source with impersonation enabled, ensure that the impersonation credentials are valid and have appropriate permissions.

It's also a good practice to use a full UNC path (e.g., \\server\share\folder\filename.xlsx) to specify the destination. I always use this converter : Universal Path Converter


Proud to be a Power BI Super User !

Microsoft Community : https://docs.microsoft.com/en-us/users/AmiraBedhiafi
Linkedin : https://www.linkedin.com/in/amira-bedhiafi/
StackOverflow : https://stackoverflow.com/users/9517769/amira-bedhiafi
C-Sharp Corner : https://www.c-sharpcorner.com/members/amira-bedhiafi
Power BI Community :https://community.powerbi.com/t5/user/viewprofilepage/user-id/332696

View solution in original post

1 REPLY 1
AmiraBedh
Super User
Super User

I think the Windows File Share folder where the report is being saved doesn't have the appropriate permissions for the account under which the Power BI Report Server service is running. You need to grant read and write permissions to that account.

 

To explain to you the situation in Power BI Report Server, there are settings related to impersonation. These settings determine under which account the reports are executed and delivered. You should check the following settings:

  • Service Account: the Power BI Report Server service is running under an account must have the permission to write to the specified file share

  • Data Source Impersonation: If your report uses a data source with impersonation enabled, ensure that the impersonation credentials are valid and have appropriate permissions.

It's also a good practice to use a full UNC path (e.g., \\server\share\folder\filename.xlsx) to specify the destination. I always use this converter : Universal Path Converter


Proud to be a Power BI Super User !

Microsoft Community : https://docs.microsoft.com/en-us/users/AmiraBedhiafi
Linkedin : https://www.linkedin.com/in/amira-bedhiafi/
StackOverflow : https://stackoverflow.com/users/9517769/amira-bedhiafi
C-Sharp Corner : https://www.c-sharpcorner.com/members/amira-bedhiafi
Power BI Community :https://community.powerbi.com/t5/user/viewprofilepage/user-id/332696

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.