# 使用 Discourse 作为桌面应用的 SSO

**URL:** https://meta.discourse.org/t/using-discourse-as-sso-for-desktop-app/136429
**Category:** SSO
**Created:** [2019年十二月18日 18:25 UTC](https://meta.discourse.org/t/using-discourse-as-sso-for-desktop-app/136429 "2019-12-18T18:25:29Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Marc\_Montecalvo](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/marc_montecalvo/32/160134_2.png) [@Marc\_Montecalvo](https://meta.discourse.org/u/Marc_Montecalvo)
#### Post date: [2019年十二月18日 18:25 UTC](https://meta.discourse.org/t/using-discourse-as-sso-for-desktop-app/136429/1 "2019-12-18T18:25:29Z")

</div>

所以我阅读了 [Use Discourse as an identity provider (SSO, DiscourseConnect)](https://meta.discourse.org/t/using-discourse-as-a-sso-provider/32974) 这篇文章，感觉这正是我需要的。但我似乎遇到了一个障碍，无法让它真正运行起来。以下是我的一些环境设置和目标。

我的 Discourse 服务器使用 Azure AD 进行登录，这运行得很好。我正在开发一个桌面应用程序（C# WPF），该应用需要使用 Discourse 进行登录。为什么要用 Discourse 而不是 Azure？不幸的是，我无法在 Azure 中创建或编辑安全组。因此，我需要从 Discourse 获取用户的组成员信息，因为应用中各种工具的权限是基于这些组的。

我尝试使用 [https://github.com/Biarity/DiscourseSso，作为一个独立工具它确实能工作。但它主要是为](https://github.com/Biarity/DiscourseSso%EF%BC%8C%E4%BD%9C%E4%B8%BA%E4%B8%80%E4%B8%AA%E7%8B%AC%E7%AB%8B%E5%B7%A5%E5%85%B7%E5%AE%83%E7%A1%AE%E5%AE%9E%E8%83%BD%E5%B7%A5%E4%BD%9C%E3%80%82%E4%BD%86%E5%AE%83%E4%B8%BB%E8%A6%81%E6%98%AF%E4%B8%BA) Web 应用设计的，我无法在我的桌面应用中使其运行。

如果有任何人设置过类似的东西并能提供帮助，那就太好了。如果任何人有在 Postman 中需要调用的接口示例，我很想看看具体是如何实现的。

谢谢！
