Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!View all the Fabric Data Days sessions on demand. View schedule
in function getAccessToken which identity does it take to authenticate
Solved! Go to Solution.
Hi @Anonymous
Welcome to the Microsoft Fabric Forum. Also ,Thank you @nilendraFabric for the contribution.
In Microsoft Fabric, getAccessToken authenticates using the identity associated with the execution context. For internal Fabric resources such as OneLake, this is typically the Workspace Managed Identity. When accessing external services or APIs, the token is obtained using the identity configured in the resource connection, which could be a user identity, managed identity, or service principal.
In notebooks, interactive runs use the signed-in user's identity, whereas scheduled runs or pipeline executions use the Run As identity configured in the job or pipeline settings.This ensures secure and context-aware access to both internal and external resources within the Fabric environment.
If this information helps resolve your issue, kindly consider marking this response as the Accepted Solution, as it may assist other community members facing similar challenges.
Thank you for being part of the Microsoft Fabric Community.
Hi @Anonymous ,
The getAccessToken function typically uses the identity of the user or service principal that is executing the request. In the context of Microsoft Fabric or Azure, this could be:
To determine exactly which identity is used, check the authentication context or logs of the service executing the function.
Hope this helps!
Hi @Anonymous
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 @Anonymous ,
The getAccessToken function typically uses the identity of the user or service principal that is executing the request. In the context of Microsoft Fabric or Azure, this could be:
To determine exactly which identity is used, check the authentication context or logs of the service executing the function.
Hope this helps!
Hi @Anonymous
Welcome to the Microsoft Fabric Forum. Also ,Thank you @nilendraFabric for the contribution.
In Microsoft Fabric, getAccessToken authenticates using the identity associated with the execution context. For internal Fabric resources such as OneLake, this is typically the Workspace Managed Identity. When accessing external services or APIs, the token is obtained using the identity configured in the resource connection, which could be a user identity, managed identity, or service principal.
In notebooks, interactive runs use the signed-in user's identity, whereas scheduled runs or pipeline executions use the Run As identity configured in the job or pipeline settings.This ensures secure and context-aware access to both internal and external resources within the Fabric environment.
If this information helps resolve your issue, kindly consider marking this response as the Accepted Solution, as it may assist other community members facing similar challenges.
Thank you for being part of the Microsoft Fabric Community.
Hi @Anonymous
getAccessToken authenticates using the identity configured for the resource connection-most commonly the workspace identity for workspace resources, or the user/service principal identity for direct API access
Check out the November 2025 Fabric update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!