Forum Discussion
Issues Authenticating via Service Principal in Fabric Notebook to Connect on Semantic Model
- 11 months ago
Hello Anonymous,
Thank you for the update. We sorry the issue persists. Based on recent Microsoft documentation, service principal authentication is supported for semantic link functions, including TOM interactions via connect_semantic_model, but it requires using the updated authentication methods introduced in semantic link version 0.12.0 or later (released around September 2025). The original service_principal_authentication approach may be incompatible due to library changes, which could explain the ImportError from mismatched versions.Recommended Steps:
- Install the latest semantic link version with !pip install -U semantic-link-sempy and restart your notebook kernel.
- Switch to set_service_principal or Azure SDK TokenCredential to set credentials, then use connect_semantic_model for TOM access. For non-interactive runs, no extra config is needed if triggered by SP.
- Confirm your SP has ReadWrite permissions on the semantic model (via XMLA endpoint enabled) for modifications like creating partitions.
- Once connected via TOM, you can add partitions to tables in the model and save changes. This works on Import mode semantic models.
If the error continues after updating, it may be a version mismatch. consider pinning to 0.12.0 specifically.
For detailed guidance:
- Service Principal Support for Semantic Link (includes authentication examples and supported functions).
- Semantic Link Overview.
- Tabular Object Model (TOM) Documentation (for partition creation via TOM).
Best regards,
Ganesh Singamshetty
Hello dimitraga10_,
Could you please confirm if your query has been resolved by the provided solutions? This would be helpful for other members who may encounter similar issues.
Thank you for being part of the Microsoft Fabric Community.
Hello v-ssriganesh
Thank you .
Unfortunately, I was not able to resolve the issue. I also cannot use an API, as the main objective is to create partitions on an Import Semantic Model.
I haven’t seen any updates from Microsoft regarding the limitation that connect_semantic_model cannot work with a service principal. In fact, the official documentation indicates that these should work together.
If anyone has experience with connecting to a semantic model via a service principal, I would greatly appreciate guidance on how to do this.
Thank you!
- v-ssriganesh11 months agoCommunity Support
Hello Anonymous,
Thank you for the update. We sorry the issue persists. Based on recent Microsoft documentation, service principal authentication is supported for semantic link functions, including TOM interactions via connect_semantic_model, but it requires using the updated authentication methods introduced in semantic link version 0.12.0 or later (released around September 2025). The original service_principal_authentication approach may be incompatible due to library changes, which could explain the ImportError from mismatched versions.Recommended Steps:
- Install the latest semantic link version with !pip install -U semantic-link-sempy and restart your notebook kernel.
- Switch to set_service_principal or Azure SDK TokenCredential to set credentials, then use connect_semantic_model for TOM access. For non-interactive runs, no extra config is needed if triggered by SP.
- Confirm your SP has ReadWrite permissions on the semantic model (via XMLA endpoint enabled) for modifications like creating partitions.
- Once connected via TOM, you can add partitions to tables in the model and save changes. This works on Import mode semantic models.
If the error continues after updating, it may be a version mismatch. consider pinning to 0.12.0 specifically.
For detailed guidance:
- Service Principal Support for Semantic Link (includes authentication examples and supported functions).
- Semantic Link Overview.
- Tabular Object Model (TOM) Documentation (for partition creation via TOM).
Best regards,
Ganesh Singamshetty