cancel
Showing results for 
Search instead for 
Did you mean: 

Permission Issues with R script when entering Credentials

I am unable to add crendential to R script on Power Bi web page and hence cant enable scheduled refresh. 

I have connected Personal Gateway, it seems to be rejecting R script data source with an error The evaluation requires a permission that has not been provided. Data source kind: 'R'. Data source path: 'R'. Permission kind: 'NativeQuery'. 

 

469 DM.PersonalGateway Information: 0 : 2018-06-30T20:26:25.6646476Z DM.PersonalGateway    93f06c13-4006-4c7a-b9a7-01b13d09e979    11850a07-e95c-59e4-5b11-58e1ee69579c    MGPP    0a97efbe-74c8-453e-9b8f-fc302274c2e2    7683252B [DM.GatewayCore] Deserialized EncryptCredentialsWithTestConnectionRequest, executing
470 DM.PersonalGateway Verbose: 0 : 2018-06-30T20:26:25.6756483Z DM.PersonalGateway    63d9492e-5e07-443a-a93e-6848c52ae183    11850a07-e95c-59e4-5b11-58e1ee69579c    MGEC    0a97efbe-74c8-453e-9b8f-fc302274c2e2    2B359B2A [DM.Pipeline.Common.TracingTelemetryService] Event: FireActivityCorrelationEvent (parentActivityId=93f06c13-4006-4c7a-b9a7-01b13d09e979)
471 DM.PersonalGateway Verbose: 0 : 2018-06-30T20:26:25.6756483Z DM.PersonalGateway    63d9492e-5e07-443a-a93e-6848c52ae183    11850a07-e95c-59e4-5b11-58e1ee69579c    MGEC    0a97efbe-74c8-453e-9b8f-fc302274c2e2    BB5F1B73 [DM.Pipeline.Common.TracingTelemetryService] Event: FireActivityStartedEvent ()
472 DM.PersonalGateway Verbose: 0 : 2018-06-30T20:26:25.6996494Z DM.PersonalGateway    6781ff88-6cc6-4359-b867-9ba00483bd92    11850a07-e95c-59e4-5b11-58e1ee69579c    MGTD    0a97efbe-74c8-453e-9b8f-fc302274c2e2    07BA8D06 [DM.Pipeline.Common.TracingTelemetryService] Event: FireActivityCorrelationEvent (parentActivityId=63d9492e-5e07-443a-a93e-6848c52ae183)
473 DM.PersonalGateway Verbose: 0 : 2018-06-30T20:26:25.6996494Z DM.PersonalGateway    6781ff88-6cc6-4359-b867-9ba00483bd92    11850a07-e95c-59e4-5b11-58e1ee69579c    MGTD    0a97efbe-74c8-453e-9b8f-fc302274c2e2    BB5F1B73 [DM.Pipeline.Common.TracingTelemetryService] Event: FireActivityStartedEvent ()
474 DM.PersonalGateway Information: 0 : 2018-06-30T20:26:25.7206495Z DM.PersonalGateway    6781ff88-6cc6-4359-b867-9ba00483bd92    11850a07-e95c-59e4-5b11-58e1ee69579c    MGTD    0a97efbe-74c8-453e-9b8f-fc302274c2e2    B83A3E6E [DataMovement.PipeLine.GatewayDataAccess] SingleSignOnInformation isnull
475 DM.PersonalGateway Information: 0 : 2018-06-30T20:26:25.7206495Z DM.PersonalGateway    6781ff88-6cc6-4359-b867-9ba00483bd92    11850a07-e95c-59e4-5b11-58e1ee69579c    MGTD    0a97efbe-74c8-453e-9b8f-fc302274c2e2    E41368EA [DataMovement.PipeLine.GatewayDataAccess] Upn is
476 DM.PersonalGateway Information: 0 : 2018-06-30T20:26:25.8836551Z DM.PersonalGateway    6781ff88-6cc6-4359-b867-9ba00483bd92    11850a07-e95c-59e4-5b11-58e1ee69579c    MGTD    0a97efbe-74c8-453e-9b8f-fc302274c2e2    9BE2A3E3 [DataMovement.PipeLine.MashupCommon] Setting mashup connection test connection properties
477 DM.PersonalGateway Error: 0 : 2018-06-30T20:26:28.2187363Z DM.PersonalGateway    6781ff88-6cc6-4359-b867-9ba00483bd92    11850a07-e95c-59e4-5b11-58e1ee69579c    MGTD    0a97efbe-74c8-453e-9b8f-fc302274c2e2    5F6763FE [DM.Pipeline.Diagnostics] Exception object created [IsBenign=True]: Microsoft.PowerBI.DataMovement.Pipeline.Diagnostics.MashupDataAccessException: MashupException encountered while accessing the target data source.; ErrorShortName: MashupDataAccessException[ErrorCode=-2147467259,HResult=-2147467259]/Wrapped(MashupPermissionException)[ErrorCode=-2147467259,HResult=-2147467259]
478 DM.PersonalGateway Error: 0 : 2018-06-30T20:26:28.2187363Z DM.PersonalGateway    6781ff88-6cc6-4359-b867-9ba00483bd92    11850a07-e95c-59e4-5b11-58e1ee69579c    MGTD    0a97efbe-74c8-453e-9b8f-fc302274c2e2    8AA61592 [DM.Pipeline.Diagnostics] Exception data: DM_ErrorDetailNameCode_UnderlyingErrorCode = <pi>-2147467259</pi>
479 DM.PersonalGateway Error: 0 : 2018-06-30T20:26:28.2187363Z DM.PersonalGateway    6781ff88-6cc6-4359-b867-9ba00483bd92    11850a07-e95c-59e4-5b11-58e1ee69579c    MGTD    0a97efbe-74c8-453e-9b8f-fc302274c2e2    881B0B12 [DM.Pipeline.Diagnostics] Exception data: DM_ErrorDetailNameCode_UnderlyingErrorMessage = <pi><pi>The evaluation requires a permission that has not been provided. Data source kind: 'R'. Data source path: 'R'. Permission kind: 'NativeQuery'.</pi></pi>
480 DM.PersonalGateway Error: 0 : 2018-06-30T20:26:28.2187363Z DM.PersonalGateway    6781ff88-6cc6-4359-b867-9ba00483bd92    11850a07-e95c-59e4-5b11-58e1ee69579c    MGTD    0a97efbe-74c8-453e-9b8f-fc302274c2e2    6A5E25DC [DM.Pipeline.Diagnostics] Exception data: DM_ErrorDetailNameCode_UnderlyingHResult = <pi>-2147467259</pi>
481 DM.PersonalGateway Error: 0 : 2018-06-30T20:26:28.2187363Z DM.PersonalGateway    6781ff88-6cc6-4359-b867-9ba00483bd92    11850a07-e95c-59e4-5b11-58e1ee69579c    MGTD    0a97efbe-74c8-453e-9b8f-fc302274c2e2    6935993A [DM.Pipeline.Diagnostics] Exception data: Microsoft.Data.Mashup.MashupSecurityException.DataSources = <pi>[{"kind":"R","path":"R"}]</pi>
482 DM.PersonalGateway Error: 0 : 2018-06-30T20:26:28.2187363Z DM.PersonalGateway    6781ff88-6cc6-4359-b867-9ba00483bd92    11850a07-e95c-59e4-5b11-58e1ee69579c    MGTD    0a97efbe-74c8-453e-9b8f-fc302274c2e2    CE6FDB5C [DM.Pipeline.Diagnostics] Exception data: Microsoft.Data.Mashup.MashupSecurityException.Reason = <pi>NativeQuery</pi>
483 DM.PersonalGateway Error: 0 : 2018-06-30T20:26:28.2187363Z DM.PersonalGateway    6781ff88-6cc6-4359-b867-9ba00483bd92    11850a07-e95c-59e4-5b11-58e1ee69579c    MGTD    0a97efbe-74c8-453e-9b8f-fc302274c2e2    F11C3CB4 [DM.Pipeline.Diagnostics] Exception data: Microsoft.Data.Mashup.PermissionError.DataSourceKind = <pi>R</pi>
484 DM.PersonalGateway Error: 0 : 2018-06-30T20:26:28.2187363Z DM.PersonalGateway    6781ff88-6cc6-4359-b867-9ba00483bd92    11850a07-e95c-59e4-5b11-58e1ee69579c    MGTD    0a97efbe-74c8-453e-9b8f-fc302274c2e2    5408D089 [DM.Pipeline.Diagnostics] Exception data: Microsoft.Data.Mashup.PermissionError.DataSourcePath = <pi>R</pi>
485 DM.PersonalGateway Error: 0 : 2018-06-30T20:26:28.2187363Z DM.PersonalGateway    6781ff88-6cc6-4359-b867-9ba00483bd92    11850a07-e95c-59e4-5b11-58e1ee69579c    MGTD    0a97efbe-74c8-453e-9b8f-fc302274c2e2    9DB8203F [DM.Pipeline.Diagnostics] Exception data: Microsoft.Data.Mashup.PermissionError.PermissionKind = <pi>NativeQuery</pi>
486 DM.PersonalGateway Error: 0 : 2018-06-30T20:26:28.2187363Z DM.PersonalGateway    6781ff88-6cc6-4359-b867-9ba00483bd92    11850a07-e95c-59e4-5b11-58e1ee69579c    MGTD    0a97efbe-74c8-453e-9b8f-fc302274c2e2    146260F7 [DM.Pipeline.Diagnostics] Exception data: Microsoft.Data.Mashup.PermissionError.PermissionProperties = <pi>{}</pi>
487 DM.PersonalGateway Error: 0 : 2018-06-30T20:26:28.2197303Z DM.PersonalGateway    6781ff88-6cc6-4359-b867-9ba00483bd92    11850a07-e95c-59e4-5b11-58e1ee69579c    MGTD    0a97efbe-74c8-453e-9b8f-fc302274c2e2    BE9599DE [DM.Pipeline.Diagnostics] Exception data: Microsoft.Data.Mashup.PermissionError.PermissionValue = <pi>A=1</pi>
488 DM.PersonalGateway Error: 0 : 2018-06-30T20:26:28.2227363Z DM.PersonalGateway    6781ff88-6cc6-4359-b867-9ba00483bd92    11850a07-e95c-59e4-5b11-58e1ee69579c    MGTD    0a97efbe-74c8-453e-9b8f-fc302274c2e2    1FA64B4F [DM.Pipeline.Common.TracingTelemetryService] Event: FireActivityCompletedWithFailureEvent (duration=2522, err=MashupDataAccessException, rootcauseErrorEventId=0)
489 DM.PersonalGateway Error: 0 : 2018-06-30T20:26:28.2227363Z DM.PersonalGateway    63d9492e-5e07-443a-a93e-6848c52ae183    11850a07-e95c-59e4-5b11-58e1ee69579c    MGEC    0a97efbe-74c8-453e-9b8f-fc302274c2e2    2C8A5D66 [DM.Pipeline.Common.TracingTelemetryService] Event: FireActivityCompletedWithFailureEvent (duration=2547, err=MashupDataAccessException, rootcauseErrorEventId=0)
490 DM.PersonalGateway Error: 0 : 2018-06-30T20:26:28.2237326Z DM.PersonalGateway    93f06c13-4006-4c7a-b9a7-01b13d09e979    11850a07-e95c-59e4-5b11-58e1ee69579c    MGPP    0a97efbe-74c8-453e-9b8f-fc302274c2e2    D27308B9 [DM.Pipeline.Common.TracingTelemetryService] Event: FireActivityCompletedWithFailureEvent (duration=2597, err=MashupDataAccessException, rootcauseErrorEventId=0)
491 DM.PersonalGateway Error: 0 : 2018-06-30T20:26:28.2407371Z DM.PersonalGateway    c4cabd1d-98f0-4367-9cfa-ba6958539f90    11850a07-e95c-59e4-5b11-58e1ee69579c    MDSR    0a97efbe-74c8-453e-9b8f-fc302274c2e2    C2CBAD30 [DM.GatewayCore] Error processing request: [0]Microsoft.PowerBI.DataMovement.Pipeline.Diagnostics.MashupDataAccessException: MashupException encountered while accessing the target data source.
492 
493 GatewayPipelineErrorCode=DM_GWPipeline_Gateway_MashupDataAccessError --->
494 [1]Microsoft.PowerBI.DataMovement.Pipeline.Diagnostics.GatewayPipelineWrapperException: Substituted: MashupPermissionException:<pi>Microsoft.Data.Mashup.MashupPermissionException (0x80004005): The evaluation requires a permission that has not been provided. Data source kind: 'R'. Data source path: 'R'. Permission kind: 'NativeQuery'.
495    at Microsoft.Data.Mashup.ProviderCommon.MashupResource.<>c__DisplayClass4`1.<StartEvaluationAndGetResultSource>b__2()
496    at Microsoft.Mashup.Security.Impersonation.RunAsProcessUser[T](Func`1 func)
497    at Microsoft.Data.Mashup.MashupCommand.EvaluateAndGetSource[T](String commandText, CommandType commandType, Int32 commandTimeout, MashupParameterCollection parameters, String resultTransform, Boolean forColumnInfo, Boolean executeAction)
498    at Microsoft.Data.Mashup.MashupCommand.ExecuteReader(CommandBehavior commandBehavior, MashupCommandBehavior mashupCommandBehavior)
499    at Microsoft.Data.Mashup.MashupCommand.ExecuteReader()
500    at Microsoft.Data.Mashup.DataSourceReference.TestConnection(String connectionString)
501    at Microsoft.PowerBI.DataMovement.Pipeline.MashupCommon.MashupUtils.DSRTestConnectionAsync(String dsrJson, MashupCredential credential)
502    at Microsoft.PowerBI.DataMovement.Pipeline.GatewayDataAccess.MashupOleDbConnectionProvider.<TestConnectionAsync>d__3.MoveNext()</pi>

Status: Needs Info
Comments
Moderator

Hi @pnelson786,

 

Which Power BI on-premise data gateway (personal mode) do you run? 

 

Based on my test with on-premise data gateway (personal mode) version 14.16.6745.2, R data source can be set with WindowsWithoutImpersonation authentication and refresh successfully. 

 

q1.PNGq3.PNGq2.PNG

 

 

Please update your gateway version then test again. Please also ensure your current Windows user has permission to access the R directory. 

 

Best Regards,
Qiuyun Yu 

Established Member
Status changed to: Needs Info
 
Visitor

I am using the latest Gateway same as you. Yes Windows users has permissions to R user directory. It is the admin account on the machine.

 

image.png

 

I can publish fine from my Power Bi desktop.

image.png

Regular Visitor

same issue here

New Member

I am getting the same issue here. Is there a fix? 

Occasional Visitor

I am having a same issue. Is there any update?