Requested by: @jernejk via YakShaver.ai π¦¬
cc: @jernejk, @Freego1783
Hi Team!
Β Β π₯Β Β Watch the video (1 min 13 sec)
Β Β π SSW Rule: Do you use Azure Managed Identities?
Pain
SSW.Rewards has System Assigned Managed Identity already enabled on the App Service, and Key Vault RBAC is properly configured. However, the actual service connections (SQL, Blob Storage, Notification Hub) still use connection string secrets stored in Key Vault rather than authenticating via Managed Identity directly.
This means:
- Secrets still need to be rotated and managed
- Connection strings with embedded credentials are stored in Key Vault
- The Managed Identity setup gives false confidence β it's only used for Key Vault access, not for the services themselves
Current State (what MSI is/isn't used for)
| Service |
Current Auth |
MSI Ready? |
| Key Vault |
β
MSI (RBAC role assignment) |
β
Done |
| Blob Storage |
β Connection string via Key Vault (despite preferMsi: true in code) |
π‘ Partially |
| Azure SQL (App DB) |
β SQL credentials via Key Vault |
β No |
| Azure SQL (Hangfire) |
β SQL credentials via Key Vault |
β No |
| Notification Hub |
β Connection string via Key Vault |
β No |
| Azure Maps |
β API key via Key Vault |
β οΈ May not support MSI |
| Graph API (email) |
β Client secret via Key Vault |
β οΈ Separate concern |
| Firebase |
β Credentials JSON via Key Vault |
β οΈ External service |
Acceptance Criteria
SQL Server β Managed Identity Auth
Blob Storage β Managed Identity Auth
Infrastructure (Bicep)
Testing & Verification
Documentation
β οΈ Gotchas
- SysAdmin dependency: Creating contained database users and assigning SQL AD roles likely requires elevated permissions β a SysAdmin may need to be involved
- Not all services support MSI: Firebase, Azure Maps, and Graph API client secrets will likely remain in Key Vault β that's OK
- Local dev unchanged:
DefaultAzureCredential falls back to connection strings/local auth, so Docker-based local dev should still work
- Different MSI patterns per service: SQL needs Azure AD auth + contained users, Blob needs RBAC roles, each has different SDK integration
Screenshot

Figure: SSW Rewards lacks managed identity integration despite SSW rules
Requested by: @jernejk via YakShaver.ai π¦¬
cc: @jernejk, @Freego1783
Hi Team!
Β Β π₯Β Β Watch the video (1 min 13 sec)
Β Β π SSW Rule: Do you use Azure Managed Identities?
Pain
SSW.Rewards has System Assigned Managed Identity already enabled on the App Service, and Key Vault RBAC is properly configured. However, the actual service connections (SQL, Blob Storage, Notification Hub) still use connection string secrets stored in Key Vault rather than authenticating via Managed Identity directly.
This means:
Current State (what MSI is/isn't used for)
preferMsi: truein code)Acceptance Criteria
SQL Server β Managed Identity Auth
sql.bicepto enable Azure AD-only authentication (currently has both SQL admin + AD admin)Infrastructure/ConfigureServices.csto useDefaultAzureCredentialwithSqlConnection(viaAzure.Identity+Microsoft.Data.SqlClient)SqlConnectionStringandHangfireSqlConnectionStringsecrets from Key Vaultwebapp.bicepto remove Key Vault connection string references, replace with server/database name app settingsBlob Storage β Managed Identity Auth
preferMsi: trueβ verify it works with service URI instead of connection stringwebapp.bicepto pass Blob Storage service URI instead of connection stringContentStorageConnectionStringsecret from Key VaultInfrastructure (Bicep)
add-kv-role-assignment.bicep)webapp.bicepapp settings to use service endpoints instead of Key Vault secret references where possibleTesting & Verification
Documentation
DefaultAzureCredentialfalls back to connection strings/local auth, so Docker-based local dev should still workScreenshot
Figure: SSW Rewards lacks managed identity integration despite SSW rules