Changing user password using application role

283 Views Asked by At

I'm using SqlServer and the application role for my application, but I also have username in SqlServer.

Is there any possibility to change user password when using the application role?
When I'm trying to change user password I get an error, that I don't have permission to change it.

I granted an alter permission to the application role, but it didn't help.

1

There are 1 best solutions below

0
On

AFAIK, this is not possible and really isn't the use case application role was designed for.

Application roles are database level objects, or more accurately principals since it is a security object. Logins are server level principals. You cannot grant a server level privilege to a database level principal.

It really isn't the use case for app roles but if you absolutely must do it, you can create a stored procedure in the database used by the app and configure it to execute under a different principal but it's hacky and I wouldn't do it for a production system.