Forum Discussion
fabric token missing
- 1 year ago
Hi bao_phan ,
Thank you for reaching out to Microsoft Community.
To call your model through a Fabric Model Endpoint, you need a Microsoft Entra ID formerly Azure AD access token with the appropriate permissions. Here's how to set it up properly:Register an application in Microsoft Entra ID.
Add API permissions for Microsoft Fabric by including the scope:
https://api.fabric.microsoft.com/.default
you use it when requesting a token, This is a permission scope, used only when acquiring a token from Microsoft Entra ID (Azure AD). It tells Entra ID to issue a token that includes all application permissions the app has been granted for Microsoft Fabric.Generate the access token using the Microsoft Authentication Library (MSAL) or a tool like Postman:
For delegated access (user context), use AcquireTokenInteractive.
For application-level access (service principal), use AcquireTokenForClient along with the client secret.
Please refer to these documents and blogs for troubleshooting your issue: Serve real-time predictions with ML model endpoints (Preview) - Microsoft Fabric | Microsoft Learn
Using FabricRestClient To Make Fabric REST API Calls
c# - Generating token for Fabric Rest api using client secret - Stack Overflow
Hope this helps.
Best regards,
Chaithra E.
Hi bao_phan ,
Thank you for reaching out to Microsoft Community.
To call your model through a Fabric Model Endpoint, you need a Microsoft Entra ID formerly Azure AD access token with the appropriate permissions. Here's how to set it up properly:
Register an application in Microsoft Entra ID.
Add API permissions for Microsoft Fabric by including the scope:
https://api.fabric.microsoft.com/.default
you use it when requesting a token, This is a permission scope, used only when acquiring a token from Microsoft Entra ID (Azure AD). It tells Entra ID to issue a token that includes all application permissions the app has been granted for Microsoft Fabric.
Generate the access token using the Microsoft Authentication Library (MSAL) or a tool like Postman:
For delegated access (user context), use AcquireTokenInteractive.
For application-level access (service principal), use AcquireTokenForClient along with the client secret.
Please refer to these documents and blogs for troubleshooting your issue: Serve real-time predictions with ML model endpoints (Preview) - Microsoft Fabric | Microsoft Learn
Using FabricRestClient To Make Fabric REST API Calls
c# - Generating token for Fabric Rest api using client secret - Stack Overflow
Hope this helps.
Best regards,
Chaithra E.