{"id":15430529,"url":"https://github.com/lenisha/node-vault-aad","last_synced_at":"2025-06-19T20:42:12.778Z","repository":{"id":116070820,"uuid":"164358774","full_name":"lenisha/node-vault-aad","owner":"lenisha","description":"Node and SQL Server AAD Auth test","archived":false,"fork":false,"pushed_at":"2019-01-08T03:05:31.000Z","size":47,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-19T06:38:14.334Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lenisha.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-01-07T00:41:37.000Z","updated_at":"2019-01-07T16:03:05.000Z","dependencies_parsed_at":null,"dependency_job_id":"50086c74-eb5e-4620-8cc2-161644dbcd33","html_url":"https://github.com/lenisha/node-vault-aad","commit_stats":{"total_commits":2,"total_committers":1,"mean_commits":2.0,"dds":0.0,"last_synced_commit":"6bad7ed499f467722fa220d20f7b3ca7331b1f9f"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/lenisha/node-vault-aad","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lenisha%2Fnode-vault-aad","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lenisha%2Fnode-vault-aad/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lenisha%2Fnode-vault-aad/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lenisha%2Fnode-vault-aad/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lenisha","download_url":"https://codeload.github.com/lenisha/node-vault-aad/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lenisha%2Fnode-vault-aad/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260827649,"owners_count":23069002,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-01T18:16:48.679Z","updated_at":"2025-06-19T20:42:07.772Z","avatar_url":"https://github.com/lenisha.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Test AAD authentication with Tedious driver on Azure App Service\n\nTo run the app:\n\n- Create on Azure `Web App + SQL`\n- Set AAD Admin on sql Database\n\n- Create DB table and rows\n```\n\n  CREATE TABLE [dbo].[assessment] (\n    [assessment_id] [nvarchar](max),        \n    [assessment_status] [nvarchar](max),\n    [created_on] DATETIME,\n    [modified_on] DATETIME\n)\n GO\n\n Insert into [dbo].[assessment] ( assessment_id, assessment_status) values ('1000', 'success');\n Insert into [dbo].[assessment] ( assessment_id, assessment_status) values ('1002', 'retry');\n\n select * from [dbo].[assessment];\n ```\n\n- set App Service \u003e App Settings (or locally variables)\n\n```\nAZURE_AD_PASS=\u003cPASS\u003e\nAZURE_AD_USER=\u003cUSER\u003e@domain.onmicrosoft.com\nAZURE_SQL_SRV=\u003cSERVER\u003e.database.windows.net\nTEDIOUS_TDS_VERSION=7_4\nWEBSITE_NODE_DEFAULT_VERSION=10.14.1\n```\n- Zip and Deploy to App service (e.g using Kudu https://scm.site/ZipDeployUI) or locally npm start\n\n\nError received:\n```\nApplication has thrown an uncaught exception and is terminated:\nError: No event 'routingChange' in state 'SentLogin7Withfedauth'\n    at Connection.dispatchEvent (D:\\home\\site\\wwwroot\\node_modules\\tedious\\lib\\connection.js:1086:26)\n    at Parser.tokenStreamParser.on.token (D:\\home\\site\\wwwroot\\node_modules\\tedious\\lib\\connection.js:775:12)\n    at emitOne (events.js:96:13)\n    at Parser.emit (events.js:188:7)\n    at Parser.parser.on.token (D:\\home\\site\\wwwroot\\node_modules\\tedious\\lib\\token\\token-stream-parser.js:27:14)\n    at emitOne (events.js:96:13)\n    at Parser.emit (events.js:188:7)\n    at addChunk (D:\\home\\site\\wwwroot\\node_modules\\readable-stream\\lib\\_stream_readable.js:296:12)\n    at readableAddChunk (D:\\home\\site\\wwwroot\\node_modules\\readable-stream\\lib\\_stream_readable.js:278:11)\n    at Parser.Readable.push (D:\\home\\site\\wwwroot\\node_modules\\readable-stream\\lib\\_stream_readable.js:239:10)\n```\n\nReferences:  \n https://docs.microsoft.com/en-us/sql/connect/node-js/step-3-proof-of-concept-connecting-to-sql-using-node-js?view=sql-server-2017\n\n https://docs.microsoft.com/en-us/azure/app-service/app-service-web-tutorial-connect-msi\n\nhttps://code.visualstudio.com/docs/nodejs/nodejs-debugging#_load-environment-variables-from-external-file-node","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flenisha%2Fnode-vault-aad","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flenisha%2Fnode-vault-aad","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flenisha%2Fnode-vault-aad/lists"}