How, in javascript, can you authenticate to Power BI Rest API without registering an app in AAD? So person from an app would provide credentials and could f.e. export some reports, refresh datasets.
Tutorials and docs first point is to register an app and get at least clientId. But example PowerShell scripts with Login-PowerBI (Connect-PowerBIServiceAccount) function let you in after filling login popup. The same is when using api documentation 'TryIt' button. I'd like to do this in javascript, but I don't quite know what scenario happens there.
In documentation 'Get an Azure AD access token for your Power BI application' https://docs.microsoft.com/en-us/power-bi/developer/embedded/get-azuread-access-token there are scenarios 'User owns data' and 'App owns data', but both want registering an app. What am I missing?