Check whether the account under which the connection is being made has access to the database.
Usually AzureDevOps uses Integrated Security (Windows Authentication).
You can see the account AzureDevOps uses to connect to SQL Server in AzureDevOps Adminstration Console under Application Tier settings by clicking "Change Account".
If the account is, say, "NT AUTHORITY\LOCAL SERVICE", check whether your SQL Server Instance has this user in its Security/Logins.
Also, make sure, the account has access to AzureDevOps_Configuration database.