Forum Discussion

daive's avatar
daive
Regular Visitor
1 year ago
Solved

Dataset takeover

Hi all,

 

I am able to takeover a dataset using the REST API (this assignes my service principal as its is the account running the script)

 

Invoke-PowerBIRestMethod -Url "groups/$($Workspace.Id)/datasets/$($Dataset.Id)/Default.TakeOver" -Method Post

 

Is it possible to specify a user other than the account\service principle running the script to takeover a dataset? So when I am running my Get-Dataset command i am able to pull the "ConfiguredBy" property. Then i assign my service principal to take over so I can set the refresh schedule but then i would like to set the takeover back to the original "ConfiguredBy" user.

 

Thanks,
David

  • yes, pretty much.

     

    and then assign the model back to the original owner.

    This act will again result in all credentials being lost and all mappings too.

3 Replies

  • You are missing the part where all credentials are nuked when you take over a dataset. You will not be able to set the refresh schedule until you have re-provided all credentials and remapped all gateway connections.

    • daive's avatar
      daive
      Regular Visitor

      Hi lbendlin ,

       

      So what I am able to do is takeover the dataset with my service principle and then set the refresh schedule. This then shows as per below

       

      What I am wanting to do is then also apply the data source mapping and then assign the model back to the original owner. All datasources are managed under cloud conenctions and all point to SQL servers. The image below is just a reference to what I am wanting to set

       

       

      But you are saying that as soon as I set the owner (or takeover) then I lose credentials to the data sources as well as the datasource mapping (image above) as well as the refresh schedule? 

      So if i am understanding you correctly then I am wasting my time taking over the model with my service principal and setting the refresh schedule?

       

      Thanks,
      David

       

       

       

      • lbendlin's avatar
        lbendlin
        Super User

        yes, pretty much.

         

        and then assign the model back to the original owner.

        This act will again result in all credentials being lost and all mappings too.