-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Your app has been throttled by AAD due to too many requests #17620
Comments
My organization is getting the same errors when attempting to deploy Dacpac tasks to Azure using Azure Active Directory credentials. |
We are getting the same with SQL Server Management Studio connecting to an Azure SQL instance. Just right-clicking on a database throws the error: TITLE: Microsoft SQL Server Management StudioFailed to connect to server xxxxxxxx.database.windows.net. (Microsoft.SqlServer.ConnectionInfo) ADDITIONAL INFORMATION: Failed to authenticate the user [xxxxxxxxxxx) in Active Directory (Authentication=ActiveDirectoryPassword). For help, click: https://docs.microsoft.com/sql/relational-databases/errors-events/mssqlserver-0-database-engine-error Environment Details: SQL Server Management Studio 19.0.20196.0+2666cdc9 |
WE are having the same issue, but the database does get published. 2023-02-28T21:44:05.1817670Z ##[section]Starting: Publish DACPAC |
Is this: dotnet/SqlClient#1915 the cause? |
We fixed this in our Azure DevOps release pipelines by adding a variable "CONNECTION_POOLING_ENABLED" with a vaule of "true" to our pipeline's variables tab.
|
This issue is stale because it has been open for 180 days with no activity. Remove the stale label or comment on the issue otherwise this will be closed in 5 days |
Note
Issues in this repo are for tracking bugs, feature requests and questions for the tasks in this repo
For a list:
https://github.com/Microsoft/azure-pipelines-tasks/tree/master/Tasks
If you have an issue or request for the Azure Pipelines service, use developer community instead:
https://developercommunity.visualstudio.com/spaces/21/index.html )
Required Information
Entering this information will route you directly to the right team and expedite traction.
Question, Bug, or Feature?
Type: Your app has been throttled by AAD due to too many requests
Failed to authenticate the user xyz@xyz.com in Active Directory (Authentication=ActiveDirectoryPassword)
Enter Task Name: Azure SQL Database deployment
list here (V# not needed):
https://github.com/Microsoft/azure-pipelines-tasks/tree/master/Tasks
Environment
Server - Azure Pipelines or TFS on-premises?
Azure Pipelines
NA
Agent - Hosted or Private:
2023-01-17T16:54:11.7491452Z Agent name: 'Azure Pipelines 2'
2023-01-17T16:54:11.7491936Z Agent machine name: 'WIN-874DJCMIS82'
2023-01-17T16:54:11.7492172Z Current agent version: '2.214.1'
2023-01-17T16:54:11.7542328Z ##[group]Operating System
2023-01-17T16:54:11.7542603Z Microsoft Windows Server 2019
Issue Description
When using Azure SQL Database deployment with Active Directory Password authentication type.
we are getting "Your app has been throttled by AAD due to too many requests" errror
[Include task name(s), screenshots and any other relevant details]
Task logs
2023-01-17T16:54:18.3329697Z ##[section]Starting: Azure SQL Deploy XxxxXxx
2023-01-17T16:54:18.3693127Z ==============================================================================
2023-01-17T16:54:18.3693774Z Task : Azure SQL Database deployment
2023-01-17T16:54:18.3694066Z Description : Deploy an Azure SQL Database using DACPAC or run scripts using SQLCMD
2023-01-17T16:54:18.3694319Z Version : 1.209.0
2023-01-17T16:54:18.3694549Z Author : Microsoft Corporation
2023-01-17T16:54:18.3694817Z Help : https://docs.microsoft.com/azure/devops/pipelines/tasks/deploy/sql-azure-dacpac-deployment
2023-01-17T16:54:18.3695056Z ==============================================================================
2023-01-17T16:54:22.1088811Z Temporary inline SQL file: C:\Users\VssAdministrator\AppData\Local\Temp\tmp6DCA.tmp
2023-01-17T16:54:22.1324270Z Invoke-Sqlcmd -connectionString "*******" -Inputfile "C:\Users\VssAdministrator\AppData\Local\Temp\tmp6DCA.tmp"
2023-01-17T16:54:35.5650450Z DACPAC file path: D:\a\r1\a\xxx_xxxxxxxx_rel\database\database\xxx_xxxxxxxx.xx.xxx.dacpac
2023-01-17T16:54:35.7442639Z ##[command]"D:\a_tasks\SqlAzureDacpacDeployment_ce85a08b-a538-4d2b-8589-1d37a9ab970f\1.209.0\vswhere.exe" -version [15.0,18.0) -latest -format json
2023-01-17T16:54:35.8725866Z "C:\Program Files\Microsoft SQL Server\160\DAC\bin\SqlPackage.exe" /Action:Publish /SourceFile:"D:\a\r1\a\xxx_xxxxxxxx_rel\database\database\xxx_xxxxxxxx.xx.xxx.dacpac" /TargetConnectionString:"Data Source=xx-xx-xx-01-xxx.database.windows.net; Initial Catalog=xx-xx-xxx-xxx-01-xxx; Authentication=Active Directory Password; UID=xxxx_xxx_xx_xxx@xxx.xxx.net; PWD=" /v:AddTestDataSet=False /v:RecreateSettings=False /v:env=uk-dv
2023-01-17T16:54:36.4228154Z Publishing to database 'xx-xx-xxx-xxx-01-xxx' on server 'xx-xx-xx-01-xxx.database.windows.net'.
2023-01-17T16:54:37.2666813Z Initializing deployment (Start)
2023-01-17T16:55:15.7845845Z Initializing deployment (Complete)
2023-01-17T16:55:15.7861205Z Analyzing deployment plan (Start)
2023-01-17T16:55:15.8961374Z Analyzing deployment plan (Complete)
2023-01-17T16:55:15.8973594Z Updating database (Start)
2023-01-17T16:55:17.6529932Z 'QUERY_STORE=OFF' is not supported in this version of SQL Server.
2023-01-17T16:55:17.6556255Z Dropping Index [dbo].[Address].[IX_FK_Address_Country]...
2023-01-17T16:55:17.6815424Z Dropping Index [dbo].[Change].[IX_FK_Change_Contract]...
2023-01-17T16:55:17.7074511Z Dropping Index [dbo].[ChangeChangeSubType].[IX_FK_ChangeChangeSubType_Change]...
2023-01-17T16:55:17.7315207Z Dropping Index [dbo].[ChangeChangeSubType].[IX_FK_ChangeChangeSubType_ChangeSubType]...
2023-01-17T16:55:17.7528093Z Dropping Index [dbo].[Contract].[IX_FK_Contract_ContractType]...
2023-01-17T16:55:17.7751501Z Dropping Index [dbo].[Contract].[IX_FK_Contract_Currency]...
2023-01-17T16:55:22.3628154Z Update complete.
2023-01-17T16:55:23.6547671Z *** Failed to authenticate the user xxxx_xxx_xx_xxx@xxx.xxx.net in Active Directory (Authentication=ActiveDirectoryPassword).
2023-01-17T16:55:23.6565034Z Error code 0xinvalid_grant
2023-01-17T16:55:23.6579141Z Your app has been throttled by AAD due to too many requests. To avoid this, cache your tokens see https://aka.ms/msal-net-throttling.
2023-01-17T16:55:24.1457052Z *** Failed to authenticate the user xxxx_xxx_xx_xxx@xxx.xxx.net in Active Directory (Authentication=ActiveDirectoryPassword).
2023-01-17T16:55:24.1473103Z Error code 0xinvalid_grant
2023-01-17T16:55:24.1493122Z Your app has been throttled by AAD due to too many requests. To avoid this, cache your tokens see https://aka.ms/msal-net-throttling.
2023-01-17T16:55:30.1918271Z *** Failed to authenticate the user xxxx_xxx_xx_xxx@xxx.xxx.net in Active Directory (Authentication=ActiveDirectoryPassword).
2023-01-17T16:55:30.1933053Z Error code 0xinvalid_grant
2023-01-17T16:55:30.1950585Z Your app has been throttled by AAD due to too many requests. To avoid this, cache your tokens see https://aka.ms/msal-net-throttling.
2023-01-17T16:55:41.9810960Z *** Failed to authenticate the user xxxx_xxx_xx_xxx@xxx.xxx.net in Active Directory (Authentication=ActiveDirectoryPassword).
2023-01-17T16:55:41.9825377Z Error code 0xinvalid_grant
2023-01-17T16:55:41.9840034Z Your app has been throttled by AAD due to too many requests. To avoid this, cache your tokens see https://aka.ms/msal-net-throttling.
2023-01-17T16:56:04.4921763Z *** Failed to authenticate the user xxxx_xxx_xx_xxx@xxx.xxx.net in Active Directory (Authentication=ActiveDirectoryPassword).
2023-01-17T16:56:04.4939222Z Error code 0xinvalid_grant
2023-01-17T16:56:04.4956161Z Your app has been throttled by AAD due to too many requests. To avoid this, cache your tokens see https://aka.ms/msal-net-throttling.
2023-01-17T16:56:49.0983521Z *** Failed to authenticate the user xxxx_xxx_xx_xxx@xxx.xxx.net in Active Directory (Authentication=ActiveDirectoryPassword).
2023-01-17T16:56:49.0998603Z Error code 0xinvalid_grant
2023-01-17T16:56:49.1013305Z Your app has been throttled by AAD due to too many requests. To avoid this, cache your tokens see https://aka.ms/msal-net-throttling.
2023-01-17T16:57:49.6876951Z *** Failed to authenticate the user xxxx_xxx_xx_xxx@xxx.xxx.net in Active Directory (Authentication=ActiveDirectoryPassword).
2023-01-17T16:57:49.6890506Z Error code 0xinvalid_grant
2023-01-17T16:57:49.6904852Z Your app has been throttled by AAD due to too many requests. To avoid this, cache your tokens see https://aka.ms/msal-net-throttling.
2023-01-17T16:58:50.2999342Z *** Failed to authenticate the user xxxx_xxx_xx_xxx@xxx.xxx.net in Active Directory (Authentication=ActiveDirectoryPassword).
2023-01-17T16:58:50.3014157Z Error code 0xinvalid_grant
2023-01-17T16:58:50.3027771Z Your app has been throttled by AAD due to too many requests. To avoid this, cache your tokens see https://aka.ms/msal-net-throttling.
2023-01-17T16:59:16.5816468Z
2023-01-17T16:59:16.6906601Z ##[error]The operation was canceled.
2023-01-17T16:59:16.6926462Z ##[section]Finishing: Azure SQL Deploy XxxxXxx
Troubleshooting
Checkout how to troubleshoot failures and collect debug logs: https://docs.microsoft.com/en-us/vsts/build-release/actions/troubleshooting
Error logs
[Insert error from the logs here for a quick overview]
2023-01-17T16:54:18.3329697Z ##[section]Starting: Azure SQL Deploy XxxxXxx
2023-01-17T16:54:18.3693127Z ==============================================================================
2023-01-17T16:54:18.3693774Z Task : Azure SQL Database deployment
2023-01-17T16:54:18.3694066Z Description : Deploy an Azure SQL Database using DACPAC or run scripts using SQLCMD
2023-01-17T16:54:18.3694319Z Version : 1.209.0
2023-01-17T16:54:18.3694549Z Author : Microsoft Corporation
2023-01-17T16:54:18.3694817Z Help : https://docs.microsoft.com/azure/devops/pipelines/tasks/deploy/sql-azure-dacpac-deployment
2023-01-17T16:54:18.3695056Z ==============================================================================
2023-01-17T16:54:22.1088811Z Temporary inline SQL file: C:\Users\VssAdministrator\AppData\Local\Temp\tmp6DCA.tmp
2023-01-17T16:54:22.1324270Z Invoke-Sqlcmd -connectionString "*******" -Inputfile "C:\Users\VssAdministrator\AppData\Local\Temp\tmp6DCA.tmp"
2023-01-17T16:54:35.5650450Z DACPAC file path: D:\a\r1\a\xxx_xxxxxxxx_rel\database\database\xxx_xxxxxxxx.xx.xxx.dacpac
2023-01-17T16:54:35.7442639Z ##[command]"D:\a_tasks\SqlAzureDacpacDeployment_ce85a08b-a538-4d2b-8589-1d37a9ab970f\1.209.0\vswhere.exe" -version [15.0,18.0) -latest -format json
2023-01-17T16:54:35.8725866Z "C:\Program Files\Microsoft SQL Server\160\DAC\bin\SqlPackage.exe" /Action:Publish /SourceFile:"D:\a\r1\a\xxx_xxxxxxxx_rel\database\database\xxx_xxxxxxxx.xx.xxx.dacpac" /TargetConnectionString:"Data Source=xx-xx-xx-01-xxx.database.windows.net; Initial Catalog=xx-xx-xxx-xxx-01-xxx; Authentication=Active Directory Password; UID=xxxx_xxx_xx_xxx@xxx.xxx.net; PWD=" /v:AddTestDataSet=False /v:RecreateSettings=False /v:env=uk-dv
2023-01-17T16:54:36.4228154Z Publishing to database 'xx-xx-xxx-xxx-01-xxx' on server 'xx-xx-xx-01-xxx.database.windows.net'.
2023-01-17T16:54:37.2666813Z Initializing deployment (Start)
2023-01-17T16:55:15.7845845Z Initializing deployment (Complete)
2023-01-17T16:55:15.7861205Z Analyzing deployment plan (Start)
2023-01-17T16:55:15.8961374Z Analyzing deployment plan (Complete)
2023-01-17T16:55:15.8973594Z Updating database (Start)
2023-01-17T16:55:17.6529932Z 'QUERY_STORE=OFF' is not supported in this version of SQL Server.
2023-01-17T16:55:17.6556255Z Dropping Index [dbo].[Address].[IX_FK_Address_Country]...
2023-01-17T16:55:17.6815424Z Dropping Index [dbo].[Change].[IX_FK_Change_Contract]...
2023-01-17T16:55:17.7074511Z Dropping Index [dbo].[ChangeChangeSubType].[IX_FK_ChangeChangeSubType_Change]...
2023-01-17T16:55:17.7315207Z Dropping Index [dbo].[ChangeChangeSubType].[IX_FK_ChangeChangeSubType_ChangeSubType]...
2023-01-17T16:55:17.7528093Z Dropping Index [dbo].[Contract].[IX_FK_Contract_ContractType]...
2023-01-17T16:55:17.7751501Z Dropping Index [dbo].[Contract].[IX_FK_Contract_Currency]...
2023-01-17T16:55:22.3628154Z Update complete.
2023-01-17T16:55:23.6547671Z *** Failed to authenticate the user xxxx_xxx_xx_xxx@xxx.xxx.net in Active Directory (Authentication=ActiveDirectoryPassword).
2023-01-17T16:55:23.6565034Z Error code 0xinvalid_grant
2023-01-17T16:55:23.6579141Z Your app has been throttled by AAD due to too many requests. To avoid this, cache your tokens see https://aka.ms/msal-net-throttling.
2023-01-17T16:55:24.1457052Z *** Failed to authenticate the user xxxx_xxx_xx_xxx@xxx.xxx.net in Active Directory (Authentication=ActiveDirectoryPassword).
2023-01-17T16:55:24.1473103Z Error code 0xinvalid_grant
2023-01-17T16:55:24.1493122Z Your app has been throttled by AAD due to too many requests. To avoid this, cache your tokens see https://aka.ms/msal-net-throttling.
2023-01-17T16:55:30.1918271Z *** Failed to authenticate the user xxxx_xxx_xx_xxx@xxx.xxx.net in Active Directory (Authentication=ActiveDirectoryPassword).
2023-01-17T16:55:30.1933053Z Error code 0xinvalid_grant
2023-01-17T16:55:30.1950585Z Your app has been throttled by AAD due to too many requests. To avoid this, cache your tokens see https://aka.ms/msal-net-throttling.
2023-01-17T16:55:41.9810960Z *** Failed to authenticate the user xxxx_xxx_xx_xxx@xxx.xxx.net in Active Directory (Authentication=ActiveDirectoryPassword).
2023-01-17T16:55:41.9825377Z Error code 0xinvalid_grant
2023-01-17T16:55:41.9840034Z Your app has been throttled by AAD due to too many requests. To avoid this, cache your tokens see https://aka.ms/msal-net-throttling.
2023-01-17T16:56:04.4921763Z *** Failed to authenticate the user xxxx_xxx_xx_xxx@xxx.xxx.net in Active Directory (Authentication=ActiveDirectoryPassword).
2023-01-17T16:56:04.4939222Z Error code 0xinvalid_grant
2023-01-17T16:56:04.4956161Z Your app has been throttled by AAD due to too many requests. To avoid this, cache your tokens see https://aka.ms/msal-net-throttling.
2023-01-17T16:56:49.0983521Z *** Failed to authenticate the user xxxx_xxx_xx_xxx@xxx.xxx.net in Active Directory (Authentication=ActiveDirectoryPassword).
2023-01-17T16:56:49.0998603Z Error code 0xinvalid_grant
2023-01-17T16:56:49.1013305Z Your app has been throttled by AAD due to too many requests. To avoid this, cache your tokens see https://aka.ms/msal-net-throttling.
2023-01-17T16:57:49.6876951Z *** Failed to authenticate the user xxxx_xxx_xx_xxx@xxx.xxx.net in Active Directory (Authentication=ActiveDirectoryPassword).
2023-01-17T16:57:49.6890506Z Error code 0xinvalid_grant
2023-01-17T16:57:49.6904852Z Your app has been throttled by AAD due to too many requests. To avoid this, cache your tokens see https://aka.ms/msal-net-throttling.
2023-01-17T16:58:50.2999342Z *** Failed to authenticate the user xxxx_xxx_xx_xxx@xxx.xxx.net in Active Directory (Authentication=ActiveDirectoryPassword).
2023-01-17T16:58:50.3014157Z Error code 0xinvalid_grant
2023-01-17T16:58:50.3027771Z Your app has been throttled by AAD due to too many requests. To avoid this, cache your tokens see https://aka.ms/msal-net-throttling.
2023-01-17T16:59:16.5816468Z
2023-01-17T16:59:16.6906601Z ##[error]The operation was canceled.
2023-01-17T16:59:16.6926462Z ##[section]Finishing: Azure SQL Deploy XxxxXxx
The text was updated successfully, but these errors were encountered: