Azure.ResourceManager.Sql 1.3.0 – ImportExistingDatabaseDefinition: ManagedIdentity usage and association (system-assigned vs user-assigned)
Hi,
We’re using the Azure.ResourceManager.Sql SDK (v 1.3.0) in C# to automate BACPAC imports with managed identity access to both the storage account and the SQL server.
The constructor for ImportExistingDatabaseDefinition now supports StorageKeyType.ManagedIdentity and AuthenticationType.ManagedIdentity, and the comments suggest that when using managed identity, the storageKey and administratorLogin parameters should contain the resource ID of the identity.
However, the implementation still enforces non-null checks on both parameters. This makes it unclear whether the system-assigned managed identity is actually supported or if only user-assigned identities are currently functional.
Questions
- Is the system-assigned managed identity supported when using
StorageKeyType.ManagedIdentity, or does the SDK currently only support user-assigned identities? - If user-assigned MI is required, is the correct setup to assign it to the SQL server and grant it
Storage Blob Data Readeron the target container, then pass its resource ID to theImportExistingDatabaseDefinitionparameters? - Specifically, does the identity need to be explicitly assigned in the Azure Portal under SQL Server → Identity → User-assigned → Add → [select our Managed Identity] for the import to work?
Is there an official example or documentation describing how to properly associate a managed identity with the SQL import operation?