<?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: Change Data Source Credentials with api Power BI Report Server in Report Server</title>
    <link>https://community.fabric.microsoft.com/t5/Report-Server/Change-Data-Source-Credentials-with-api-Power-BI-Report-Server/m-p/2719936#M25403</link>
    <description>&lt;P&gt;Hi,&lt;BR /&gt;I also had a similiar issue, maybe check this out &lt;A href="https://community.powerbi.com/t5/Report-Server/PBIRS-API-issue/m-p/1290394#M15524" target="_self"&gt;https://community.powerbi.com/t5/Report-Server/PBIRS-API-issue/m-p/1290394#M15524&lt;/A&gt;&amp;nbsp;&lt;BR /&gt;Ultimately I used this approach &lt;A href="https://community.powerbi.com/t5/Report-Server/Power-bi-report-server-password-update/m-p/1338173#M15801" target="_self"&gt;https://community.powerbi.com/t5/Report-Server/Power-bi-report-server-password-update/m-p/1338173#M15801&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 23 Aug 2022 10:29:35 GMT</pubDate>
    <dc:creator>whereismydata</dc:creator>
    <dc:date>2022-08-23T10:29:35Z</dc:date>
    <item>
      <title>Change Data Source Credentials with api Power BI Report Server</title>
      <link>https://community.fabric.microsoft.com/t5/Report-Server/Change-Data-Source-Credentials-with-api-Power-BI-Report-Server/m-p/2702928#M25240</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I am trying to change the credentials of a datasource with the power bi server api but I get the error "(400) Bad Request".&lt;/P&gt;&lt;P&gt;When I make the call to get the details from the datasource, this is the only thing that is returned:&lt;BR /&gt;&lt;EM&gt;{&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;Id=XXXXXXXXXXXXXXXXXX&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;Name=;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;Description=;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;Path=;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;Type=DataSource;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;Hidden=False;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;Size=0;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;ModifiedBy="XXXXXX";&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;ModifiedDate=2022-07-13T12:17:24.08+02:00;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;CreatedBy="XXXXXX";&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;CreatedDate=2022-07-13T12:16:38.52+02:00;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;ParentFolderId=;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;IsFavorite=False;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;ContentType=;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;Content=;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;IsEnabled=True;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;ConnectionString=dwh_pro;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;DataSourceType=;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;IsOriginalConnectionStringExpressionBased=False;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;IsConnectionStringOverridden=False;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;CredentialRetrieval=prompt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;IsReference=False;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;DataSourceSubType=DataModel;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;Roles=System.Object[];&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;CredentialsByUser=;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;CredentialsInServer=;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;DataModelDataSource=&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;}&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;About datasource: it is a connection to Oracle with Basic Autehntication (no windows like the others examples): Username and Password.&lt;/P&gt;&lt;P&gt;I detail the script to see if you can help me:&lt;/P&gt;&lt;P&gt;&lt;EM&gt;$payload =&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;@"&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;{&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;"Id": "XXXXXXXXXXXXXXXXXX",&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;"Name": "",&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;"Description": "",&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;"Path": "",&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;"Type": "DataSource",&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;"Hidden": False,&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;"Size": 0,&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;"ModifiedBy": "XXXXXXXX",&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;"ModifiedDate": "2022-07-13T12:17:24.08+02:00",&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;"CreatedBy": "XXXXXXXX,&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;"CreatedDate": "2022-07-13T12:16:38.52+02:00",&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;"ParentFolderId": "XXXXXXXXXX",&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;"ContentType": "",&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;"Content": "",&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;"IsFavorite": False,&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;"IsEnabled": true,&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;"ConnectionString": "dwh_pro",&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;"DataModelDataSource": {&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;"AuthType": "Unknown",&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;"SupportedAuthTypes": [&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;""&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;],&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;"Kind": "Oracle",&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;"ModelConnectionName": "",&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;"Secret": "XXXXX",&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;"Type": "Import",&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;"Username": "XXXXXX"&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;},&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;"DataSourceSubType": "DataModel",&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;"DataSourceType": "Oracle",&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;"IsOriginalConnectionStringExpressionBased": False,&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;"IsConnectionStringOverridden": true,&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;"CredentialRetrieval": "store",&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;"CredentialsByUser": {&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;"DisplayText": "",&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;"UseAsWindowsCredentials": false&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;},&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;"CredentialsInServer": {&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;"UserName": "XXXXX",&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;"Password": "XXXXX",&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;"UseAsWindowsCredentials": false,&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;"ImpersonateAuthenticatedUser": false&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;},&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;"IsReference": false&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;}&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;}&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;"@&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;$restApiUri = "&lt;A href="https://xxxxx/" target="_blank" rel="nofollow noopener noreferrer"&gt;https://XXXXX&lt;/A&gt;" + "/api/v2.0/PowerBIReports(id)/DataSources"&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;$user = "XXXXX"&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;$pass= "XXXXXX"&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;$proxy = "&lt;A href="http://xxxxxx/" target="_blank" rel="nofollow noopener noreferrer"&gt;http://XXXXXX&lt;/A&gt;"&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;$proxycred = "XXXXX"&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;$secpasswd = ConvertTo-SecureString $pass -AsPlainText -Force&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;$credential = New-Object System.Management.Automation.PSCredential($user, $secpasswd)&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;$inicio = (get-date).ToString('f')&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Invoke-RestMethod -Uri $restApiUri -Method 'Patch' -Body $payload -ContentType "application/json" -Credential $credential -Proxy $proxy -ProxyCredential $proxycred -UseBasicParsing -Verbose&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks you very much&lt;/P&gt;</description>
      <pubDate>Tue, 16 Aug 2022 11:34:33 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Report-Server/Change-Data-Source-Credentials-with-api-Power-BI-Report-Server/m-p/2702928#M25240</guid>
      <dc:creator>ClaraPS33</dc:creator>
      <dc:date>2022-08-16T11:34:33Z</dc:date>
    </item>
    <item>
      <title>Re: Change Data Source Credentials with api Power BI Report Server</title>
      <link>https://community.fabric.microsoft.com/t5/Report-Server/Change-Data-Source-Credentials-with-api-Power-BI-Report-Server/m-p/2711385#M25290</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="394868" data-lia-user-login="ClaraPS33" class="lia-mention lia-mention-user"&gt;ClaraPS33&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;“&lt;SPAN&gt;About datasource: it is a connection to Oracle with Basic Autehntication (no windows like the others examples): Username and Password.&lt;/SPAN&gt;”&lt;/P&gt;
&lt;P&gt;Have you check the password mentioned above?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;BR /&gt;Community Support Team _ Caitlyn&lt;/P&gt;
&lt;P&gt;If this post helps then please consider Accept it as the solution to help the other members find it more quickly.&lt;/P&gt;</description>
      <pubDate>Fri, 19 Aug 2022 02:51:36 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Report-Server/Change-Data-Source-Credentials-with-api-Power-BI-Report-Server/m-p/2711385#M25290</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-08-19T02:51:36Z</dc:date>
    </item>
    <item>
      <title>Re: Change Data Source Credentials with api Power BI Report Server</title>
      <link>https://community.fabric.microsoft.com/t5/Report-Server/Change-Data-Source-Credentials-with-api-Power-BI-Report-Server/m-p/2711747#M25294</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Thansk for your reply.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;The username and password indicated in CredentialsInServer and in DataModelDataSource are the same. It is the one I use to connect to the Oracle database both from my local and from power bi Report Server.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 19 Aug 2022 07:23:37 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Report-Server/Change-Data-Source-Credentials-with-api-Power-BI-Report-Server/m-p/2711747#M25294</guid>
      <dc:creator>ClaraPS33</dc:creator>
      <dc:date>2022-08-19T07:23:37Z</dc:date>
    </item>
    <item>
      <title>Re: Change Data Source Credentials with api Power BI Report Server</title>
      <link>https://community.fabric.microsoft.com/t5/Report-Server/Change-Data-Source-Credentials-with-api-Power-BI-Report-Server/m-p/2719936#M25403</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;I also had a similiar issue, maybe check this out &lt;A href="https://community.powerbi.com/t5/Report-Server/PBIRS-API-issue/m-p/1290394#M15524" target="_self"&gt;https://community.powerbi.com/t5/Report-Server/PBIRS-API-issue/m-p/1290394#M15524&lt;/A&gt;&amp;nbsp;&lt;BR /&gt;Ultimately I used this approach &lt;A href="https://community.powerbi.com/t5/Report-Server/Power-bi-report-server-password-update/m-p/1338173#M15801" target="_self"&gt;https://community.powerbi.com/t5/Report-Server/Power-bi-report-server-password-update/m-p/1338173#M15801&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 23 Aug 2022 10:29:35 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Report-Server/Change-Data-Source-Credentials-with-api-Power-BI-Report-Server/m-p/2719936#M25403</guid>
      <dc:creator>whereismydata</dc:creator>
      <dc:date>2022-08-23T10:29:35Z</dc:date>
    </item>
  </channel>
</rss>

