Add Azure Function App Identity to MSSQL

PUBLISHED ON JAN 7, 2026 — AZURE, DEVOPS, HOW-TO, MSSQL

I’m assuming you’ve already enabled a system-assigned or user-assigned identity for this. If so, all you need to do is execute the following commands in your database:

-- Create the user
CREATE USER [functionappname] FROM EXTERNAL PROVIDER;

-- Grant permissions READ/WRITE
ALTER ROLE db_datareader ADD MEMBER [functionappname];
ALTER ROLE db_datawriter ADD MEMBER [functionappname];

This grants read and write permissions to the user, though you can add more roles if needed.

That’s it!

comments powered by Disqus