Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code FABINSIDER for a $400 discount.
Register nowThe Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.
Hi Community,
Greetings!
I have a scenario where I am taking over my semantic models for my service principle and I am able to achieve this using Power BI Rest Api's. This is for an automation, so once I complete my process, I would like to revert back the ownership to the particular user
who was an actual owner before take over of service principle. Is there any API to retrieve owner info by which I want give take over for that user.
I am currently not sure if it will display owner email id due to security reasons, however requesting your help here.
Thanks in advance!
Hello @Hrishi_K_M_2000 ,
Thank you for reaching out to the Microsoft Fabric community forum with your query regarding reverting ownership of semantic models back to the respective users programmatically after using a service principal for automation.
Unfortunately, the Power BI REST API does not provide a direct method to revert ownership to the previous user programmatically. The "Take Over" functionality indeed works only for the current authenticated user, which in your case is the service principal.
Please refer to the screenshot below:
You can follow a workaround as approach:
While this approach requires some manual intervention, it ensures that the ownership is reverted accurately to the respective users.
Additionally, you can refer to the following documentation for more detailed information:
I hope my suggestions give you good ideas, if you need any further assistance, feel free to reach out.
If this post helps, then please give us Kudos and consider Accept it as a solution to help the other members find it more quickly.
Thank you.
Hi @Hrishi_K_M_2000 ,
I wanted to check if you had the opportunity to review the information provided. Please feel free to contact us if you have any further questions. If my response has addressed your query, please accept it as a solution and give a 'Kudos' so other members can easily find it.
Thank you.
I did check into your solution. However, I am currently storing the user info and I want to notify the user via Email. I am using the sendMail API and I have given mail.send and mail.sharedby API permissions. Perhaps, I am new to this, not sure if I missed anything. I get this error: 'code': 'ErrorAccessDenied', 'message': 'Access is denied. Check credentials and try again.
I am using Outlook and I understand that we will have to use smtp request, however I do not want to disclose username and password, instead I need to use service principle to send the mail. Please let me know on this.
Thanks,
Hrishi
Hello @Hrishi_K_M_2000 ,
Thank you for the details provided. The 'ErrorAccessDenied' issue typically occurs due to permission problems. Please check whether you have the specific contributor or admin permissions.
If you have all the necessary permissions and still face the issue, I suggest raising a support ticket.
Please follow the guide link below to raise a support ticket:
How to create a Fabric and Power BI Support ticket - Power BI | Microsoft Learn
If this post helps, then please give us Kudos and consider Accept it as a solution to help the other members find it more quickly.
Thank you.
Hi @v-tsaipranay I do have all the access, I will take a look at it maybe sometime later, appreciate your support. I will get back on this.
Thanks and best regards,
Hrishi
Hi @Hrishi_K_M_2000 ,
May I ask if you have resolved this issue? If so, please mark the helpful reply and accept it as the solution. This will be helpful for other community members who have similar problems to solve it faster.
Thank you.
Hi,
I can fetch the "configuredby" user details. But is there a way to revert back to the actual user, i see take over only works for the current authentication (which will be service principle in this case), however if there are x semantic models and y users. Can I not revert back to the respective users as owners programatically.
Thanks in Advance!
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the February 2025 Power BI update to learn about new features.
User | Count |
---|---|
42 | |
32 | |
32 | |
26 | |
25 |
User | Count |
---|---|
35 | |
26 | |
23 | |
21 | |
17 |