Refresh Power BI Report Server Dataset with Powershell and SQL Agent

  • Hi, I have had the below script running for approx 12 months and after a power BI Upgrade on Friday last, it has stopped working.

    I can manually work around it but it would be nice to get it working again.

    Current PowerBI Report Server version: Version 1.10.7698.27886 (January 2021).

    The error is "The remote server returned an error: (403) Forbidden."

    Does anyone have any ideas?

     

    Cheers,

    Dave

    $id = "************************ removed for security**********************"

    $URL = "http://server1/Reports/api/v2.0/CacheRefreshPlans(" + $id + ")/Model.Execute"

    #Write-Output $URL

    $MailFailureNotify = @{"notifyOption"="MailOnFailure"}

    Invoke-WebRequest -Uri $URL -Method Post -Body $MailFailureNotify -UseDefaultCredentials -UseBasicParsing

  • 403 is an HTTP error. Perhaps HTTPS is now being enforced?

    The absence of evidence is not evidence of absence.
    Martin Rees

    You can lead a horse to water, but a pencil must be lead.
    Stan Laurel

  • Hiya Phil, I tried that but no luck.

    it’s worth mentioning that other scripts using the same method are unaffected.

    cheers,

    Dave

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply