8
At the moment there is no "clean" way to programmatically (https://docs.microsoft.com/en-us/rest/api/power-bi/gateways/updatedatasource) set Anonymous access credentials for a dataset that has a Log Analytics Workspace gateway. Anonymous credentials are always refused unless you set "Skip Test Connection" from the service.

If it would be possible to skip test connection during the credentials update through powerbi API , maybe it will be possible to set the Anonymous access programmatically.
STATUS DETAILS
New