sqlcmd -d AdventureWorks2023 -S soulnorth.database.windows.net -Q "select count(*) from SalesLT.Product" --authentication-method=ActiveDirectoryManagedIdentity
gets me the following error on App Service:
This seems to happen at a stage after the connection has been established (after sql.OpenDB() has been executed successfully) and the code is just trying to fill out some variables.
In this case it seems to fail after osuser.Current() fails (probably due to sandboxing restrictions on App Services?).
Running the following command
sqlcmd -d AdventureWorks2023 -S soulnorth.database.windows.net -Q "select count(*) from SalesLT.Product" --authentication-method=ActiveDirectoryManagedIdentity
gets me the following error on App Service:This seems to happen at a stage after the connection has been established (after sql.OpenDB() has been executed successfully) and the code is just trying to fill out some variables.
In this case it seems to fail after osuser.Current() fails (probably due to sandboxing restrictions on App Services?).
Same command works on a similarly configured VM.