Showing results for 
Search instead for 
Did you mean: 
Post Patron
Post Patron

R script refresh with personal gateway - credential message

I just downloaded and installed personal gateway. Tried to schedule refresh
My data source is R.
The only option Ive got is WindowsWithoutImpersonation - which I clicked on Sign In button and it gave me the following error message.
I can successfully refresh my dataset on desktop. Can you help? Thank you
Failed to update data source credentials: An error happened while reading data from the provider: 'Could not load file or assembly 'Microsoft.PowerBI.Scripting, Version=, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. Strong name validation failed. (Exception from HRESULT: 0x8013141A)'Hide details
Activity ID:9313b16c-78f0-4268-9f74-0905e78ab55a
Request ID:74961647-e14d-433c-c9c5-082010460226
Status code:400
Time:Sun Dec 30 2018 16:15:39 GMT+0000 (GMT Standard Time)
Cluster URI:

We are having a similar issue on my team. 



When attempting to provide the R credentials on the powerBI site, the I get the same error as op. 


However, when I setup a personal gateway on my laptop that I use for work everyday, everything works fine!

I clicked the 'edit credentials' used the default only option of 'WindowsWithoutImpersonation' and set up an auto refresh and it all worked...  


I then tried to replicate this on another system to free up my laptop, but and I ended up with the same error as before. 


I can only get this working on my personal laptop. 


On all three systems, I'm running:

R 3.5.1

Personal Gateway 3000.0.265



Hey there

I decided to revert back to September release and this works.

Hi @Pedzilla,


How do you revert to September release?


Thank you,

Hey Pedzilla, 


Im glad to hear you got it working!


You rolled back to September release of R or PowerBI Personal Gateway?



yes I did 🙂

Regular Visitor

I think the problem might have to do with mash up data source. I got my data from Oracle database then transform it using R script. Then Power BI might be asking for the credential of my Oracle database while I'm supplying it with R credential. I remember there used to be more option for authentication method. Not sure why there is only one option now. @v-shex-msft

I got no other data source in my test file, it pulls data from R script only. I doubt if it’s the mash up process for me?
Regular Visitor

I haven't found any work around yet @Pedzilla


Is there any way that I could download the old version of personal gateway @v-shex-msft

What is your region? @tqbao27

I am UK based - so North Europe.

I'm in the US so I guess North America.


For this issue, I remember there used to be more options for the Authentication method, not just WindowsWithoutImpersonation.

Yeah thats true! Now there are no other options.

@v-shex-msft what is your region please?


@tqbao27 so you are in a different region to me so maybe region has nothing to do with that. 

I wonder what version of personal gateway that @v-shex-msft has installed? Maybe its not December release.

Hi @Pedzilla1,


I try to install last version of personal gateway and test with r script(3.5.1), but they all works. Maybe you can open a support ticket for better support.


submit a support ticketsubmit a support ticket



XIaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

Thank you @v-shex-msft may i ask what your region is please?

Hi @Pedzilla,


My data are stored on 'west central US'.(you can find it on click on power bi service-> about)




Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.
Community Support
Community Support

Hi @Pedzilla,


Can you please share a pbix file with some simple data and r script who can reproduce that scenario?

I will test on my side and report to power bi team if I can reproduce this issue.


BTW, I can use personal gateway to refresh r script sample file.




Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

Is it possible you can share your pbix file so i can try it here please? @v-shex-msft 

Also what is the version of your gateway?

I wont be able to share my file due to network / firewall.


However its a generic dataset  - here is the M code - hope you can help.

    Source = R.Execute("cars = data(mtcars)#(lf)mtcars$date = Sys.time()"),
    mtcars1 = Source{[Name="mtcars"]}[Value],
    #"Changed Type" = Table.TransformColumnTypes(mtcars1,{{"date", type time}})
    #"Changed Type"

Thank you so much


HI @Pedzilla,


I test with my sample and your code, they all works well.


I think this issue may relate to data region service of power bi, maybe you can try to use fiddler to trace these httprequests of refresh operation.



BTW, I also attached sample files which I tested at below.



Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

Hey there I am based in the UK. Can I actually change the region on my personal gateway?


I will try your sample now.

Your sample doesnt work when I tried on my personal gateway. I dont suppose we can change that can we?


Can you please give me your r script sample file and I will run in on my personal gateway.

My sample isn’t meaningful as it’s jusf a prof of concept that it can work on the gateway

Much appreciated many thanks @v-shex-msft

Helpful resources

MBAS on Demand

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

July 2021 Update 768x460.png

Check it out!

Click here to read more about the July 2021 Updates

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Urdu Hindi D365 Bootcamp 768x460.png

Urdu Hindi D365 Bootcamp

Dont miss our very own April Dunnam’s The Developer Guide to the Galaxy! Find out what the Power Platform has to offer for the traditional developer.

Top Solution Authors