microsoft / fabric-migration

Scripts and tooling to migrate DW and Spark workloads to Fabric.
MIT License
18 stars 7 forks source link

Use Fabric built-in Authentication #12

Open gbrueckl opened 4 months ago

gbrueckl commented 4 months ago

instead of using an AAD Service Principal it would be much easier to simply use mssparkutils.credentials to retrieve a token for the currently logged in user you can replace these lines https://github.com/microsoft/fabric-migration/blob/main/data-engineering/utils/util.py#L14-L27 with synapse_dev_token = mssparkutils.credentials.getToken("https://dev.azuresynapse.net/")

you could further derive the current workspace_id and lakehouse_id of the notebook limiting the necessary input from the user to only the synapse_workspace_name

murggu commented 3 months ago

Thanks for the feedback. The idea was to use SPN too for Fabric APIs, but UPN was used.