Forum Discussion
how to get data about users from powerbi rest api without been administrator
- 1 year ago
Thank you for this overview.
I still have a question when you say :
"Set up a separate service principal account with the required role and permissions, and use that identity for your API calls."
I do not understand beacause when a make ma api call, i use my service principal informations to get data.Here this is my python witch give me the token :
import msalimport requestsimport pandas as pd# === Paramètres ===TENANT_ID = 'my tenant id'CLIENT_ID = 'my client id of my enterprise application'CLIENT_SECRET = 'My secret '# === Authentification ===def get_graph_access_token():app = msal.ConfidentialClientApplication(client_id=CLIENT_ID,client_credential=CLIENT_SECRET)result = app.acquire_token_for_client(scopes=GRAPH_SCOPE)if "access_token" in result:return result['access_token']else:raise Exception(f"Échec de l'authentification : {result}")# === Script principal ===if __name__ == "__main__":token = get_graph_access_token()With this a can get data for microsoft graph api in is v1.0 version but for the auditlog i need to use the beta version and at this time i receive a error.
So if i understand i receive a token witch is connecting to my service principal so in this case a should not have error of permissions ?
Do i understand correct ?
If not coult you give me the solution to use my service principal correcty ?
Thank you Poojara_D12 - 1 year ago
HI Toi69___ ,
I have included the previously resolved thread and learning documents. They may help you resolve the issue
We truly appreciate your continued engagement and thank you for being an active and valued member of the community.
If you're still experiencing any challenges, please don’t hesitate to reach out we’d be more than happy to assist you further.
We look forward to hearing from you.
Best regards,
LakshmiSolved: Re: Extracting power BI Usage logs without powerBI... - Microsoft Fabric Community
Microsoft Graph permissions reference - Microsoft Graph | Microsoft Learn
Hi Toi69___ ,
Thanks for reaching out to the Microsoft fabric community forum.
rohit1991 , Poojara_D12 , lbendlin
Thanks for your prompt response
I wanted to follow up and confirm whether you’ve had the opportunity to review the information provided super users . Should you have any questions or require further clarification, please don't hesitate to reach out.
We appreciate your engagement and thank you for being an active part of the community.
Best Regards,
Lakshmi Narayana
- v-lgarikapat1 year ago
Community Support
Hi Toi69___ ,
If your question has been answered, we kindly encourage you to mark the most helpful response — such as those provided by @rohit1991, @Poojara_D12, or @lbendlin as the Accepted Solution.
Doing so helps other community members facing similar issues to find answers more easily.We truly appreciate your engagement and support.
Best regards,
LakshmiNarayana- v-lgarikapat1 year ago
Community Support
Hi Toi69___ ,
If your question has been answered, we kindly encourage you to mark the most helpful response such as those provided by @rohit1991, @Poojara_D12, or @lbendlin as the Accepted Solution.
Doing so helps other community members facing similar issues to find answers more easily.We truly appreciate your engagement and support.
Best regards,
LakshmiNarayana- v-lgarikapat1 year ago
Community Support
HI Toi69___ ,
I have included the previously resolved thread and learning documents. They may help you resolve the issue
We truly appreciate your continued engagement and thank you for being an active and valued member of the community.
If you're still experiencing any challenges, please don’t hesitate to reach out we’d be more than happy to assist you further.
We look forward to hearing from you.
Best regards,
LakshmiSolved: Re: Extracting power BI Usage logs without powerBI... - Microsoft Fabric Community
Microsoft Graph permissions reference - Microsoft Graph | Microsoft Learn