Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
2 years ago

Getting error Object not set when trying to clone a Semantic Model to another

Hello

I am a developer working on power bi embedding in dot net. I am a facing issue while I am trying to clone an existing Dataset to another,

I am following this article https://learn.microsoft.com/en-us/analysis-services/tom/tom-pbi-datasets?view=asallproducts-allversions#creating-and-cloning-models

where it has explained to create and clone models

 

everyting works fine until below highlighted line

 

when this above highlighted line executes it throw error because Model property is always null, I tried to create multiple reports and published on power bi service but no luck on those as well.

 

my workspace is in dedicated capacity and I am using service principal in my embedded app

 

could anyone help here

 

Thanks in advance

2 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Anonymous ,

    Based on the description, try to verify that the service principal has the necessary permissions on the workspace.

    Then, try to check if the dedicated capacity is properly for cloning.

    Besides, review if having a model can be cloned.

    Viewing the following document to learn more information.

    Embed Power BI content in an embedded analytics application with service principal and an application secret - Power BI | Microsoft Learn

     

    Best Regards,

    Wisdom Wu

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hello Anonymous,

      First of all thanks for your help here,

      As per your suggestion I cross checked about the things that you explained above

       

      1) My service principal has admin permissions on the workspace.

      2) I checked about dedicated capacity, and found that I am using premium capacity you can see below screenshot

      But I am not sure how to check if dedicated capacity is properly for cloning? could you please expain more, how i can check if capacity has enough rights to clone models?

       

      3) if having a model can be cloned? here also I am not sure how to check if model can be cloned or not, could you please elaborate how to make sure if model can be cloned?

       

      more about my model: I have created Report from Power BI Desktop and using Sql server data connection and published in Power Bi services and change connection to sql gateway, and refresh the model.

       

      I am egger to heard from you

      Thanks in advance

      Yogesh