# MSSQL from RPi to Windows

**URL:** <https://discourse.nodered.org/t/mssql-from-rpi-to-windows/30860>\
**Category:** General\
**Created:** [29 July 2020 07:52 UTC](https://discourse.nodered.org/t/mssql-from-rpi-to-windows/30860 "2020-07-29T07:52:24Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Earl](https://avatars.discourse-cdn.com/v4/letter/e/ea666f/32.png) [@Earl](https://discourse.nodered.org/u/Earl)\
**Post date:** [29 July 2020 07:52 UTC](https://discourse.nodered.org/t/mssql-from-rpi-to-windows/30860/1 "2020-07-29T07:52:25Z")

</div>

Hello everyone. I am having trouble with sending queries from [node-red-contrib-mssql-plus](https://flows.nodered.org/node/node-red-contrib-mssql-plus) coming from my Pi to an MSSQL server in windows pc. This is the error:

> "Login failed. The login is from an untrusted domain and cannot be used with Windows authentication."

But the first question is, is it possible? Second, if yes, anyone knows how to use this with Windows Authentication?

Thank you in advance.

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [29 July 2020 16:03 UTC](https://discourse.nodered.org/t/mssql-from-rpi-to-windows/30860/2 "2020-07-29T16:03:11Z")

</div>

Is this MS SQL Lite by any chance? eg. on a Windows desktop rather than a server? On a server, it would be unusual to use Windows authentication to connect to MS SQL.

Normally, you would need to use Kerberos. So a domain login would get a Kerberos token which is then passed onto the server.

Unfortunately, I have no understanding of the mssql-plus node so can't comment on what, if any, authentication and authorisation it is capable of.

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [29 July 2020 16:55 UTC](https://discourse.nodered.org/t/mssql-from-rpi-to-windows/30860/3 "2020-07-29T16:55:35Z")

</div>

Give this a go  
1 - Don't use the FQDN in the domain property. If it's `company.com`, use `COMPANY`  
2 - Capitalisation seems to matter as well. We've had success with ALL-CAP domain names  
3 - _Don't_ use a qualified user name (i.e. `user.name@company.com` just `user.name`

Try with and without encryption

Please feedback whether you are successful or not and what you did to get it to work.

I am a maintainer of that library and would like to know either way.

Ta.

---

<div class="post-metadata">

**Author:** ![Gawan](https://avatars.discourse-cdn.com/v4/letter/g/e9c0ed/32.png) [@Gawan](https://discourse.nodered.org/u/Gawan)\
**Post date:** [29 July 2020 23:00 UTC](https://discourse.nodered.org/t/mssql-from-rpi-to-windows/30860/4 "2020-07-29T23:00:00Z")

</div>

simply create a SQL login and use it with SQL authentication

---

<div class="post-metadata">

**Author:** ![Earl](https://avatars.discourse-cdn.com/v4/letter/e/ea666f/32.png) [@Earl](https://discourse.nodered.org/u/Earl)\
**Post date:** [30 July 2020 02:16 UTC](https://discourse.nodered.org/t/mssql-from-rpi-to-windows/30860/5 "2020-07-30T02:16:18Z")

</div>

Hello again everyone. We just removed the domain and gladly it worked. I'm not really an IT guy so I apologize in advance and expect a lot of simple problems coming from me, though I'm working with our IT department for a project. They helped me fix this problem, sorry for all the trouble. Thank you for being always responsive.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [13 August 2020 02:16 UTC](https://discourse.nodered.org/t/mssql-from-rpi-to-windows/30860/6 "2020-08-13T02:16:19Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
