<?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 PowerShell refresh dataset in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/PowerShell-refresh-dataset/m-p/1482215#M26396</link>
    <description>&lt;P&gt;Hi.&lt;/P&gt;&lt;P&gt;I'm trying to use this to update a dataset in portal:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;$User = "firstname.lastname@company.com"&lt;BR /&gt;$PW = "VerySecretivePassword"&lt;/P&gt;&lt;P&gt;$SecPasswd = ConvertTo-SecureString $PW -AsPlainText -Force&lt;BR /&gt;$myCred = New-Object System.Management.Automation.PSCredential($User,$SecPasswd)&lt;/P&gt;&lt;P&gt;Connect-PowerBIServiceAccount -Credential $myCred&lt;/P&gt;&lt;P&gt;$DataSetID = "XXXX-XXXX-XXXX-XXXX"&lt;BR /&gt;$WorkSpaceID = "XXXX-XXXX-XXXX-XXXX"&lt;/P&gt;&lt;P&gt;$RefreshDSURL = 'groups/' + $WorkSpaceID + '/datasets/' + $DataSetID + '/refreshes'&lt;BR /&gt;$MailFailureNotify = @{"notifyOption"="MailOnFailure"}&lt;BR /&gt;Invoke-PowerBIRestMethod -Url $RefreshDSURL -Method Post -Body $MailFailureNotify&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But what I get back is:&lt;BR /&gt;Failed to get ADAL token: Unhandled Exception: System.AggregateException: One or more errors occurred. ---&amp;gt; Microsoft.IdentityModel.Clients.ActiveDirectory.AdalClaimChallengeException: AADSTS50076: Due to a configuration change made by your administrator, or because you moved to a new location, you must use multi-factor authentication to access [...]&lt;/P&gt;&lt;P&gt;Response status code does not indicate success: 400 (BadRequest)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sure, we do use MFA but it pop-up only flashes quickly. What should I do about the ADAL token?&lt;BR /&gt;Thanks - a lot!&lt;/P&gt;</description>
    <pubDate>Mon, 09 Nov 2020 08:27:12 GMT</pubDate>
    <dc:creator>GoingIncognito</dc:creator>
    <dc:date>2020-11-09T08:27:12Z</dc:date>
    <item>
      <title>PowerShell refresh dataset</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/PowerShell-refresh-dataset/m-p/1482215#M26396</link>
      <description>&lt;P&gt;Hi.&lt;/P&gt;&lt;P&gt;I'm trying to use this to update a dataset in portal:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;$User = "firstname.lastname@company.com"&lt;BR /&gt;$PW = "VerySecretivePassword"&lt;/P&gt;&lt;P&gt;$SecPasswd = ConvertTo-SecureString $PW -AsPlainText -Force&lt;BR /&gt;$myCred = New-Object System.Management.Automation.PSCredential($User,$SecPasswd)&lt;/P&gt;&lt;P&gt;Connect-PowerBIServiceAccount -Credential $myCred&lt;/P&gt;&lt;P&gt;$DataSetID = "XXXX-XXXX-XXXX-XXXX"&lt;BR /&gt;$WorkSpaceID = "XXXX-XXXX-XXXX-XXXX"&lt;/P&gt;&lt;P&gt;$RefreshDSURL = 'groups/' + $WorkSpaceID + '/datasets/' + $DataSetID + '/refreshes'&lt;BR /&gt;$MailFailureNotify = @{"notifyOption"="MailOnFailure"}&lt;BR /&gt;Invoke-PowerBIRestMethod -Url $RefreshDSURL -Method Post -Body $MailFailureNotify&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But what I get back is:&lt;BR /&gt;Failed to get ADAL token: Unhandled Exception: System.AggregateException: One or more errors occurred. ---&amp;gt; Microsoft.IdentityModel.Clients.ActiveDirectory.AdalClaimChallengeException: AADSTS50076: Due to a configuration change made by your administrator, or because you moved to a new location, you must use multi-factor authentication to access [...]&lt;/P&gt;&lt;P&gt;Response status code does not indicate success: 400 (BadRequest)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sure, we do use MFA but it pop-up only flashes quickly. What should I do about the ADAL token?&lt;BR /&gt;Thanks - a lot!&lt;/P&gt;</description>
      <pubDate>Mon, 09 Nov 2020 08:27:12 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/PowerShell-refresh-dataset/m-p/1482215#M26396</guid>
      <dc:creator>GoingIncognito</dc:creator>
      <dc:date>2020-11-09T08:27:12Z</dc:date>
    </item>
  </channel>
</rss>

