Has anyone managed to get Cake working with Azure’s managed identities?
I can connect directly from the app service in a test.php file using:
<?php
$azureServer = 'my-server.database.windows.net';
$azureDatabase = 'sqldb-mydb-001';
$connectionInfo = array(
'Database' => $azureDatabase,
'Authentication' => 'ActiveDirectoryMsi'
);
$conn = sqlsrv_connect($azureServer, $connectionInfo);
this works fine so I know it’s configured OK.
I tried creating a DSN but for whatever reason it kills my app and no errors get logged:
'url' => 'Driver={ODBC Driver 17 for SQL Server};Server=my-server.database.windows.net,1433;Database=sqldb-mydb-001;Authentication=ActiveDirectoryMsi;UID=a;'
Any ideas what I may be missing?