Forum Discussion
Authenticating an R or Python script
- 7 years ago
Yeah I'm more comfortable with the few people I will work on the report with having access to my credentials than those who I'll share the report with.
Thanks for the help all, looks like hard-coding the username and password is the best option for me here
Hi samwoolerton,
The only approach would be:
1) Create Username and Password parameters. See example - https://www.youtube.com/watch?v=iiNDq2VrZPY
2) Use them in M (PowerQuery) script at the beginning
3) Then Populate them to R/Python script.
And then you will be able to open parameters window at any time.
Regards,
Ruslan
-------------------------------------------------------------------
Did I answer your question? Mark my post as a solution!
- samwoolerton7 years agoRegular Visitor
Hey Ruslan,
Thanks for the update here - Guyinacube videos are great!
Downside of this approach is that any user of the Power BI report can still see those parameters (they're not hidden away like credentials are for other data sources).
Any way to get around this?
Thanks,
Sam- Anonymous7 years agoNot applicable
samwoolerton,
You can directly define parameters(user name and password) in Advanced Editor of your query in Power BI Desktop following the guide in this similar thread, and then create a Power BI report template(.PBIT) .
This way, when each user open the PBIT in Power BI Desktop, they will be prompted to enter username and password.
Regards,
Lydia- zoloturu7 years agoMemorable Member
samwoolerton, Anonymous,
On the one hand, approach sounds as an alternative but on the other hand, once you publish a report with such parameters to Power BI Service then your parameters will be opened to everyone who has access to a workspace.
Regards,
Ruslan