The Power BI getting started sample shows you how to
- Register a Native Client Application
- Get an Azure Active Directory access token
- Get all datasets
- Create a dataset
- Add rows to a dataset
- How to add Active Directory Authentication Library
See complete Getting Started with the Power BI REST API article on MSDN.