This session examines how to set datasource credentials for Power BI datasets using code. The session begins by discussing the advantages and programming techniques for setting datasource credentials as a user versus as a service principal. The session will examine scenarios for a variety of datasource types including Azure SQL, anonymous Web sites, SharePoint, Azure Data Lake Gen2 and Azure Data Explorer. Campers will learn when and how to set credentials using Anonymous Credentials, Basic Credentials, Key Credentials and OAuth2 Credentials. The session will also examine managing datasources and credentials with On-Prem Gateways. Along the way, this session will examine the most common gotchas, connector limitations and workarounds that can make setting datasource credentials a tricky undertaking.

What Campers Will Learn:

  • How and why to set datasource credentials as a user versus as a service principal
  • How to set Anonymous Credentials on HTTP datasources
  • How to set Basic Credentials on Azure SQL datasources
  • How to set Key Credentials on Azure Data Lake datasources
  • How to set OAuth2 Credentials for SharePoint and Azure Kusto datasources
  • How to Managing Datasources and Credentials with On-Prem Gateways

Session Prerequisites

Students should have previous experience with programming the Power BI REST API using C# and the Power BI .NET SDK.