<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Subscribing Power BI reports through API in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/Subscribing-Power-BI-reports-through-API/m-p/4252378#M57972</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/21750"&gt;@Expiscornovus&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="shyamganesh_0-1729590219278.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/1187099i5F06E9EED1A6196C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="shyamganesh_0-1729590219278.png" alt="shyamganesh_0-1729590219278.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;The API you meantioned is not for creating subscription for power bi reports. I am not using postman though&lt;/P&gt;</description>
    <pubDate>Tue, 22 Oct 2024 09:45:13 GMT</pubDate>
    <dc:creator>shyamganesh</dc:creator>
    <dc:date>2024-10-22T09:45:13Z</dc:date>
    <item>
      <title>Subscribing Power BI reports through API</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Subscribing-Power-BI-reports-through-API/m-p/4252195#M57965</link>
      <description>&lt;P&gt;Hi All,&lt;BR /&gt;&lt;BR /&gt;I am trying to do subscribing reports through REST API. But i am not able to do it through API. I knew we can make through Power Automate and in my case i need to do from API end. Is there any solution?&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://learn.microsoft.com/en-us/rest/api/power-bi-report/subscriptions" target="_blank" rel="noopener"&gt;https://learn.microsoft.com/en-us/rest/api/power-bi-report/subscriptions&lt;/A&gt;&amp;nbsp; --- these existing api is not working as expected. Anyother ideas?&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 22 Oct 2024 08:13:48 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Subscribing-Power-BI-reports-through-API/m-p/4252195#M57965</guid>
      <dc:creator>shyamganesh</dc:creator>
      <dc:date>2024-10-22T08:13:48Z</dc:date>
    </item>
    <item>
      <title>Re: Subscribing Power BI reports through API</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Subscribing-Power-BI-reports-through-API/m-p/4252216#M57966</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/805767"&gt;@shyamganesh&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When you say, it doesn't work as expected, what do you mean? Are you getting an error code?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If so, can you share a screenshot of your current flow setup that is not working (or explain it in more detail)?&lt;/P&gt;</description>
      <pubDate>Tue, 22 Oct 2024 08:20:51 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Subscribing-Power-BI-reports-through-API/m-p/4252216#M57966</guid>
      <dc:creator>Expiscornovus</dc:creator>
      <dc:date>2024-10-22T08:20:51Z</dc:date>
    </item>
    <item>
      <title>Re: Subscribing Power BI reports through API</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Subscribing-Power-BI-reports-through-API/m-p/4252237#M57967</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/21750"&gt;@Expiscornovus&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;This is code i used for subcribing reports through API&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;--Code--&lt;/P&gt;&lt;P&gt;import requests&lt;BR /&gt;import json&lt;/P&gt;&lt;P&gt;# Define constants&lt;BR /&gt;CLIENT_ID = '#######################'&lt;BR /&gt;CLIENT_SECRET = '#######################'&lt;BR /&gt;TENANT_ID = '#######################'&lt;BR /&gt;RESOURCE = '&lt;A href="https://analysis.windows.net/powerbi/api" target="_blank"&gt;https://analysis.windows.net/powerbi/api&lt;/A&gt;'&lt;BR /&gt;API_URL = '&lt;A href="https://api.powerbi.com/v1.0/myorg/groups/{GROUP_ID}/reports/{REPORT_ID}/subscriptions" target="_blank"&gt;https://api.powerbi.com/v1.0/myorg/groups/{GROUP_ID}/reports/{REPORT_ID}/subscriptions&lt;/A&gt;'&lt;/P&gt;&lt;P&gt;def get_access_token():&lt;BR /&gt;url = f'&lt;A href="https://login.microsoftonline.com/{TENANT_ID}/oauth2/v2.0/token" target="_blank"&gt;https://login.microsoftonline.com/{TENANT_ID}/oauth2/v2.0/token&lt;/A&gt;'&lt;BR /&gt;headers = {&lt;BR /&gt;'Content-Type': 'application/x-www-form-urlencoded'&lt;BR /&gt;}&lt;BR /&gt;body = {&lt;BR /&gt;'grant_type': 'client_credentials',&lt;BR /&gt;'client_id': CLIENT_ID,&lt;BR /&gt;'client_secret': CLIENT_SECRET,&lt;BR /&gt;'scope': RESOURCE + '/.default'&lt;BR /&gt;}&lt;BR /&gt;response = requests.post(url, headers=headers, data=body)&lt;BR /&gt;if response.status_code == 200:&lt;BR /&gt;return response.json().get('access_token')&lt;BR /&gt;else:&lt;BR /&gt;print(f"Failed to obtain access token. Status Code: {response.status_code}, Response: {response.text}")&lt;BR /&gt;return None&lt;/P&gt;&lt;P&gt;def create_subscription(access_token, group_id, report_id):&lt;BR /&gt;url = API_URL.format(GROUP_ID=group_id, REPORT_ID=report_id)&lt;BR /&gt;headers = {&lt;BR /&gt;'Authorization': f'Bearer {access_token}',&lt;BR /&gt;'Content-Type': 'application/json'&lt;BR /&gt;}&lt;BR /&gt;data = {&lt;BR /&gt;"displayName": "My Subscription",&lt;BR /&gt;"schedule": {&lt;BR /&gt;"frequency": "Daily",&lt;BR /&gt;"timeZone": "Pacific Standard Time",&lt;BR /&gt;"times": ["07:00"]&lt;BR /&gt;},&lt;BR /&gt;"status": "Enabled"&lt;BR /&gt;}&lt;BR /&gt;response = requests.post(url, headers=headers, json=data)&lt;BR /&gt;if response.status_code == 201:&lt;BR /&gt;print("Subscription created successfully.")&lt;BR /&gt;else:&lt;BR /&gt;print(f"Failed to create subscription. Status Code: {response.status_code}, Response: {response.text}")&lt;/P&gt;&lt;P&gt;if __name__ == "__main__":&lt;BR /&gt;# Replace with your workspace and report IDs&lt;BR /&gt;GROUP_ID = '########################'&lt;BR /&gt;REPORT_ID = '#######################'&lt;/P&gt;&lt;P&gt;token = get_access_token()&lt;BR /&gt;if token:&lt;BR /&gt;create_subscription(token, GROUP_ID, REPORT_ID)&lt;BR /&gt;&lt;BR /&gt;Error&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;Failed to create subscription. Status Code: 404, Response: {
  "error":{
    "code":"","message":"No HTTP resource was found that matches the request URI}}&lt;/PRE&gt;</description>
      <pubDate>Tue, 22 Oct 2024 08:31:19 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Subscribing-Power-BI-reports-through-API/m-p/4252237#M57967</guid>
      <dc:creator>shyamganesh</dc:creator>
      <dc:date>2024-10-22T08:31:19Z</dc:date>
    </item>
    <item>
      <title>Re: Subscribing Power BI reports through API</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Subscribing-Power-BI-reports-through-API/m-p/4252340#M57969</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/805767"&gt;@shyamganesh&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Have you tried the&amp;nbsp;Admin - Reports GetReportSubscriptionsAsAdmin method instead?&lt;/P&gt;&lt;P&gt;&lt;A href="https://learn.microsoft.com/en-us/rest/api/power-bi/admin/reports-get-report-subscriptions-as-admin" target="_blank"&gt;https://learn.microsoft.com/en-us/rest/api/power-bi/admin/reports-get-report-subscriptions-as-admin&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;https://api.powerbi.com/v1.0/myorg/admin/reports/{reportId}/subscriptions&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Btw, are you testing in Postman? If not, that is probably easier to test.&lt;/P&gt;</description>
      <pubDate>Tue, 22 Oct 2024 09:23:30 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Subscribing-Power-BI-reports-through-API/m-p/4252340#M57969</guid>
      <dc:creator>Expiscornovus</dc:creator>
      <dc:date>2024-10-22T09:23:30Z</dc:date>
    </item>
    <item>
      <title>Re: Subscribing Power BI reports through API</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Subscribing-Power-BI-reports-through-API/m-p/4252364#M57971</link>
      <description>&lt;P&gt;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/805767"&gt;@shyamganesh&lt;/a&gt;&amp;nbsp;You can't call this api because it&amp;nbsp;does not exist.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ref&amp;nbsp;&lt;A href="https://community.fabric.microsoft.com/t5/Developer/How-to-manage-report-subscriptions-in-Power-BI-cloud-version/m-p/4248050#M57921" target="_blank"&gt;Solved: How to manage report subscriptions in Power BI clo... - Microsoft Fabric Community&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 22 Oct 2024 09:37:02 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Subscribing-Power-BI-reports-through-API/m-p/4252364#M57971</guid>
      <dc:creator>felaray</dc:creator>
      <dc:date>2024-10-22T09:37:02Z</dc:date>
    </item>
    <item>
      <title>Re: Subscribing Power BI reports through API</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Subscribing-Power-BI-reports-through-API/m-p/4252378#M57972</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/21750"&gt;@Expiscornovus&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="shyamganesh_0-1729590219278.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/1187099i5F06E9EED1A6196C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="shyamganesh_0-1729590219278.png" alt="shyamganesh_0-1729590219278.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;The API you meantioned is not for creating subscription for power bi reports. I am not using postman though&lt;/P&gt;</description>
      <pubDate>Tue, 22 Oct 2024 09:45:13 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Subscribing-Power-BI-reports-through-API/m-p/4252378#M57972</guid>
      <dc:creator>shyamganesh</dc:creator>
      <dc:date>2024-10-22T09:45:13Z</dc:date>
    </item>
    <item>
      <title>Re: Subscribing Power BI reports through API</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Subscribing-Power-BI-reports-through-API/m-p/4252393#M57973</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/821847"&gt;@felaray&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;Any others ideas apart from power automate?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 22 Oct 2024 09:52:08 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Subscribing-Power-BI-reports-through-API/m-p/4252393#M57973</guid>
      <dc:creator>shyamganesh</dc:creator>
      <dc:date>2024-10-22T09:52:08Z</dc:date>
    </item>
    <item>
      <title>Re: Subscribing Power BI reports through API</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Subscribing-Power-BI-reports-through-API/m-p/4252423#M57974</link>
      <description>&lt;P&gt;It is not related to Power Automate, but rather to the Power BI API. I am unable to make calls using Postman because Microsoft has not made the relevant API available.&lt;/P&gt;</description>
      <pubDate>Tue, 22 Oct 2024 10:13:10 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Subscribing-Power-BI-reports-through-API/m-p/4252423#M57974</guid>
      <dc:creator>felaray</dc:creator>
      <dc:date>2024-10-22T10:13:10Z</dc:date>
    </item>
    <item>
      <title>Re: Subscribing Power BI reports through API</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Subscribing-Power-BI-reports-through-API/m-p/4252430#M57975</link>
      <description>&lt;P&gt;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/21750"&gt;@Expiscornovus&lt;/a&gt;&amp;nbsp;This is a read-only API that can retrieve subscription-related information. Unfortunately, it does not support write operations.&lt;/P&gt;</description>
      <pubDate>Tue, 22 Oct 2024 10:15:20 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Subscribing-Power-BI-reports-through-API/m-p/4252430#M57975</guid>
      <dc:creator>felaray</dc:creator>
      <dc:date>2024-10-22T10:15:20Z</dc:date>
    </item>
    <item>
      <title>Re: Subscribing Power BI reports through API</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Subscribing-Power-BI-reports-through-API/m-p/4252440#M57976</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/805767"&gt;@shyamganesh&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My bad, I missed that body payload with the schedule. I thought you were collecting/retrieving subscriptions from the existing report on the Power BI Online service.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The link you were referring to in your opening post was a REST API call from Power BI report server (on-premise). Like&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/821847"&gt;@felaray&lt;/a&gt;&amp;nbsp;already mentioned, that method doesn't exist in the Online APIs.&lt;/P&gt;</description>
      <pubDate>Tue, 22 Oct 2024 10:25:30 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Subscribing-Power-BI-reports-through-API/m-p/4252440#M57976</guid>
      <dc:creator>Expiscornovus</dc:creator>
      <dc:date>2024-10-22T10:25:30Z</dc:date>
    </item>
  </channel>
</rss>

