Home
%3CLINGO-SUB%20id%3D%22lingo-sub-386118%22%20slang%3D%22en-US%22%3EAzure%20samples%20for%20Azure%20AD%20.Net%20WebApi%20using%20Azure%20AD%20%22on-behalf%20of%20token%22%20to%20connect%20to%20SQL%20DB%20and%20SQL%20DW%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-386118%22%20slang%3D%22en-US%22%3E%0A%20%26lt%3Bmeta%20http-equiv%3D%22Content-Type%22%20content%3D%22text%2Fhtml%3B%20charset%3DUTF-8%22%20%2F%26gt%3B%3CSTRONG%3EFirst%20published%20on%20MSDN%20on%20Nov%2030%2C%202016%20%3C%2FSTRONG%3E%20%3CBR%20%2F%3E%20The%20C%23%20code%20samples%20attached%20in%20the%20zip%20file%20below%20present%20a%20solution%20for%20the%20front-mid%20tier%20architecture%20allowing%20client%20applications%20to%20use%20individual%20Azure%20AD%20user%20credentials%20to%20connect%20to%20SQL%20DB%2FDW%20using%20mid-tier%20WEB%20app%20%E2%80%9Con-behalf%20of%20token%E2%80%9D%20obtained%20from%20Azure%20AD%20by%20redeeming%20individual%20user%E2%80%99s%20access%20token.%20This%20solution%20represents%20a%20standard%20configuration%20for%20client%20applications%20accessing%20the%20database%20using%20Azure%20AD%20authentication%20and%20a%20mid-tier%20WEB%20app%20as%20the%20main%20node%20communicating%20with%20the%20database.%20%3CBR%20%2F%3E%20For%20more%20information%20on%20Azure%20AD%20authentication%20with%20SQL%20DB%2FDW%20see%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fsql-database%2Fsql-database-aad-authentication%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3E%20https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fsql-database%2Fsql-database-aad-authentication%20%3C%2FA%3E%20.%20%3CBR%20%2F%3E%20%3CBR%20%2F%3E%20The%20attached%20zip%20file%20contains%20an%20extensive%20README%20file%20describing%20the%20whole%20setup%20process%20step-by-step.%20%3CBR%20%2F%3E%20Download%20the%20zip%20file%20below.%20%3CBR%20%2F%3E%20%3CA%20href%3D%22https%3A%2F%2Fmsdnshared.blob.core.windows.net%2Fmedia%2F2016%2F12%2FWebApiOnbehalf.Azuredb.zip%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3E%20webapionbehalf-azuredb%20%3C%2FA%3E%3C%2FLINGO-BODY%3E%3CLINGO-TEASER%20id%3D%22lingo-teaser-386118%22%20slang%3D%22en-US%22%3EFirst%20published%20on%20MSDN%20on%20Nov%2030%2C%202016%20The%20C%23%20code%20samples%20attached%20in%20the%20zip%20file%20below%20present%20a%20solution%20for%20the%20front-mid%20tier%20architecture%20allowing%20client%20applications%20to%20use%20individual%20Azure%20AD%20user%20credentials%20to%20connect%20to%20SQL%20DB%2FDW%20using%20mid-tier%20WEB%20app%20%E2%80%9Con-behalf%20of%20token%E2%80%9D%20obtained%20from%20Azure%20AD%20by%20redeeming%20individual%20user%E2%80%99s%20access%20token.%3C%2FLINGO-TEASER%3E%3CLINGO-LABS%20id%3D%22lingo-labs-386118%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3ESQLServerSecurity%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
Microsoft
First published on MSDN on Nov 30, 2016
The C# code samples attached in the zip file below present a solution for the front-mid tier architecture allowing client applications to use individual Azure AD user credentials to connect to SQL DB/DW using mid-tier WEB app “on-behalf of token” obtained from Azure AD by redeeming individual user’s access token. This solution represents a standard configuration for client applications accessing the database using Azure AD authentication and a mid-tier WEB app as the main node communicating with the database.
For more information on Azure AD authentication with SQL DB/DW see https://docs.microsoft.com/en-us/azure/sql-database/sql-database-aad-authentication .

The attached zip file contains an extensive README file describing the whole setup process step-by-step.
Download the zip file below.
webapionbehalf-azuredb