2

I have RLS implemented in Azure SQL2016 DB, and it works fine when using UserID and Password in connection string. However, When I use Token authentication (which works without RLS) instead of u/p, RLS doesn't work. I get the expected error when inserting:

The attempted operation failed because the target object 'server.dbo.mytable' has a block predicate that conflicts with this operation. If the operation is performed on a view, the block predicate might be enforced on the underlying table. Modify the operation to target only the rows that are allowed by the block predicate.The statement has been terminated

0

1 Answer 1

1

Integrated security still works in my instance if I include an initial catalog with the connection string

<!-- Does not work -->
ConnectionString="Data Source=(localdb)\MSSQLLocalDB;Integrated Security=True;Persist Security Info=False;Pooling=False;MultipleActiveResultSets=False;Connect Timeout=60;Encrypt=False;TrustServerCertificate=True"


<!-- Works -->
ConnectionString="Data Source=(localdb)\MSSQLLocalDB;Integrated Security=True;initial catalog=MyDatabase;Persist Security Info=False;Pooling=False;MultipleActiveResultSets=False;Connect Timeout=60;Encrypt=False;TrustServerCertificate=True"
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.