Is there a way to the IP address range for the hosted machine running?
This is related to the Release Pipeline -> Hosted agent.
Issue: Getting access denied
In case you came looking here becasue you're getting this error when trying to use Azure DevOps to MSBuild and deploy to an Azure SQL server and going slightly mad because nothing seems to be on the internet and people are all taking about using power shell scripts to find out the IP address of the server and white listing etc.., then you may be better of using a task called "Azure SQL Database deployment" in your yml file as well as the MSBuild like so:
- task: MSBuild@1
displayName: Build the database project
inputs:
solution: '**/projectname.sqlproj'
msbuildArguments: '/t:Restore /t:Build '
- task: SqlAzureDacpacDeployment@1
inputs:
azureSubscription: ''
AuthenticationType: 'server'
ServerName: '.database.windows.net'
DatabaseName: ''
SqlUsername: ''
SqlPassword: ''
deployType: 'DacpacTask'
DeploymentAction: 'Publish'
DacpacFile: '**/projectname.dacpac'
IpDetectionMethod: 'AutoDetect'
the IpDetectionMethod of auto worked for me put it does allow you to easily put in your own values (although i haven't tried that)