Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Join us at FabCon Vienna from September 15-18, 2025, for the ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM. Get registered

Reply
Toi69___
Regular Visitor

how to get azure users profil from azure with a notebook

Hello guys,

I need to get informations from azure.
I need to get the azure user profiles informations using a notebook in fabric.
I created my application on the azure portal and i configure the permissions User.Read.All et Directory.Read.All but i still receive i issue that indicate that i have not enought permissions.
I have a member role in azure.

If anyone have an idea.

Thank you

1 ACCEPTED SOLUTION
v-kpoloju-msft
Community Support
Community Support

Hi @Toi69___

Thank you for reaching out to the Microsoft fabric community forum. And also thanks @burakkaragoz, for your insights on this thread. I have identified few alternative workarounds that may assist in resolving the thread.

From what you have shared, it sounds like your app is currently set up with delegated permissions (User.Read.All, Directory.Read.All), but either admin consent has not been granted yet, or the permission type is not quite right for how you are using it.

Since you are most likely calling Microsoft Graph from a Fabric notebook using app only (no user) authentication, you will want to switch those to Application permissions instead.

  • Go to your Azure app’s API permissions and update them to Application permissions (User.Read.All, Directory.Read.All)
  • Make sure a Global Admin grants admin consent for those permissions
  • In your notebook, use the client credentials OAuth2 flow to get an access token

Once that's all set up, your notebook should be able to call the Microsoft Graph API and pull user profile info successfully.

Kindly please refer to the below documentation links for better understanding:
Microsoft identity platform admin consent protocols - Microsoft identity platform | Microsoft Learn
Microsoft Graph permissions reference - Microsoft Graph | Microsoft Learn
Get access without a user - Microsoft Graph | Microsoft Learn

Let us know if you would like help with any of these steps or if you have any doubts feel free to reach out to us. We will be happy to assist.

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 for using Microsoft Community Forum.

View solution in original post

3 REPLIES 3
v-kpoloju-msft
Community Support
Community Support

Hi @Toi69___

Thank you for reaching out to the Microsoft fabric community forum. And also thanks @burakkaragoz, for your insights on this thread. I have identified few alternative workarounds that may assist in resolving the thread.

From what you have shared, it sounds like your app is currently set up with delegated permissions (User.Read.All, Directory.Read.All), but either admin consent has not been granted yet, or the permission type is not quite right for how you are using it.

Since you are most likely calling Microsoft Graph from a Fabric notebook using app only (no user) authentication, you will want to switch those to Application permissions instead.

  • Go to your Azure app’s API permissions and update them to Application permissions (User.Read.All, Directory.Read.All)
  • Make sure a Global Admin grants admin consent for those permissions
  • In your notebook, use the client credentials OAuth2 flow to get an access token

Once that's all set up, your notebook should be able to call the Microsoft Graph API and pull user profile info successfully.

Kindly please refer to the below documentation links for better understanding:
Microsoft identity platform admin consent protocols - Microsoft identity platform | Microsoft Learn
Microsoft Graph permissions reference - Microsoft Graph | Microsoft Learn
Get access without a user - Microsoft Graph | Microsoft Learn

Let us know if you would like help with any of these steps or if you have any doubts feel free to reach out to us. We will be happy to assist.

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 for using Microsoft Community Forum.

burakkaragoz
Community Champion
Community Champion

Hi @Toi69___ ,

 

So if you’re getting the “not enough permissions” error even after adding User.Read.All and Directory.Read.All, it’s probably because those permissions on their own aren’t enough unless they’re granted admin consent in Azure AD. Just being a member won’t let you read all user profiles, since those are pretty sensitive permissions.

To fix this, someone with admin rights in your Azure AD will need to go to your app registration and grant admin consent for those permissions. If you only gave user consent, it won’t work for Directory.Read.All or User.Read.All at that level.

Also, make sure your notebook is actually authenticating as your app and not just your user, sometimes that trips people up as well.

If you don’t have admin access yourself, you might need to ask your Azure admin to help with this part.

Hope this helps, let me know if you’re still stuck!

If my response resolved your query, kindly mark it as the Accepted Solution to assist others. Additionally, I would be grateful for a 'Kudos' if you found my response helpful.

Thank you all for your help i get the users' informations from azure.
Last step is to get the AuditLog records.
I allready add the LogEvent permission to my application but something still appenning.
The question is i grant my application by ME (user) do i need to have the permission to see the audit log i thing yes but i ask.

Thank

Helpful resources

Announcements
May FBC25 Carousel

Fabric Monthly Update - May 2025

Check out the May 2025 Fabric update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.