question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Not passing `domain` value for identifying the tenantId

See original GitHub issue

https://github.com/tediousjs/tedious/blob/69ad8243d400d19fb05230c027ff74648b91a2e8/src/connection.ts#L3539

I’ve been trying to connect to my mssql DB using Azure AD Auth on sequelize, however I get the following message Security token could not be authenticated or authorized.. After debugging inside sequelize, then tedious and finally ms-rest-nodeauth, I realized that ms-rest-nodeauth does not get the options.domain value. The function loginWithUsernamePassword from tedious login.ts file is not passing that value to the nodeauth function, even when tedious does get it from sequelize. I wonder if it is due to some specific reason or there may be an issue here. I debugged the Auth process and was able to make the Azure AD Auth connection with my mssql DB if I set up the options.domain value manually when the auth process gets to withUsernamePassword function (stopping here with a breakpoint). If this is not the correct way for setting this up, I’ll need some help from Tedious team. Any one?

Using: sequelize@5.22.3 tedious@6.4.0

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:18 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
carlosjrodriguezpcommented, Nov 6, 2020

Awesome, I’d appreciate this help since we’re required for security reasons to change our connection to Azure AD Auth. Thanks! @IanChokS

0reactions
carlosjrodriguezpcommented, Dec 14, 2020

Awesome, thanks for all the help and support!

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to find your Azure Active Directory tenant ID
Find tenant ID through the Azure portal · Sign in to the Azure portal. · Select Azure Active Directory. · Select Properties. ·...
Read more >
Fix error message for failed domain login to include the correct ...
I've used Azure AD account (work). I haven't tried if the above scenario appears for MSA as well. Make sure that command Clear-AzureRmContext...
Read more >
How to Find a Microsoft 365 Tenant Identifier
Every Microsoft 365/Office 365 tenant has a unique identifier. Sometimes you need to know the Microsoft 365 tenant identifier.
Read more >
How to get the organization (tenant) id from user profile using ...
Just do a GET to "https://login.microsoftonline.com/{yourdomainname}/.well-known/openid-configuration". The structure returned will have the  ...
Read more >
How To Identify A Company's Domains With Azure AD - NixIntel
All the domains that an organisation manages via Azure AD will be associated to their tenant ID. This means that when a domain...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found