Skip to content
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

OAuth Authentication Fails for Azure SQL Server in Go (go-mssqldb) #806

Open
rpgohate-tibco opened this issue Sep 12, 2024 · 0 comments
Open

Comments

@rpgohate-tibco
Copy link

Description:
I'm attempting to implement OAuth authentication for an Azure SQL Server database using the go-mssqldb driver. I have the following details:

Client ID
Client Secret
Tenant ID

I have successfully retrieved the access token using these credentials, but when I run the program, I encounter the following error:

2024/09/10 15:06:13 Error pinging the database: mssql: login error: Login failed for user ''.
exit status 1
It seems like the user information is either missing or not being properly set.

My Setup:
Go version: go1.20.4 linux/amd64
go-mssqldb version: v1.7.2
OAuth flow: Using client credentials (client ID, secret, tenant ID).
Question:
Does the go-mssqldb driver support OAuth authentication for Azure SQL Server?
If yes, am I missing any specific configuration steps?
How should I correctly pass the OAuth token for authentication?
Any help or guidance would be appreciated!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant