Non-interactive access in Power BI

Power BI authentication is described in Microsoft’s documentation, but may be quite annoying at the very beginning. I have some pieces of code to making it working.

Authenticate

You need to authenticate as regular human. MFA won’t work. As a result you will get access token.

Call API

To call any API you need to pass access token in the ‘Authorization’ header.