Hi ,
Thanks for reaching out to Microsoft Q&A.
Hope you have run a check on these already? if not pls go ahead.
- Account Lockout or Disablement: Frequent query executions might trigger security mechanisms that temporarily lock or disable the user's account.
- Permission Issues: The user may lack necessary permissions on the specific database, even if they can access the master database.
- Group Membership Propagation Delays: Changes in AAD group memberships might not immediately reflect in Azure SQL Database permissions.
Recommended Troubleshooting Steps:
Verify Account Status: Ensure the user's account is active and not locked or disabled.
Check Database-Specific Permissions: Confirm that the user has appropriate permissions on the target database. Even if the user is part of an AAD group with access, individual permissions might need verification.
Review AAD Group Memberships: Ensure that group membership changes have propagated correctly. This can sometimes take time, and delays might cause intermittent access issues.
Monitor for Security Policies: Check if there are any security policies or triggers that might block users after a certain threshold of queries or activities.
Consult SQL Server Error Logs: Detailed error logs can provide more context about the failure. Access these logs to identify patterns or specific triggers for the error.
Please feel free to click the 'Upvote' (Thumbs-up) button and 'Accept as Answer'. This helps the community by allowing others with similar queries to easily find the solution.