diff options
author | Dirk Klimpel <5740567+dklimpel@users.noreply.github.com> | 2021-07-01 11:26:24 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-01 11:26:24 +0200 |
commit | 6c02cca95f8136010062b6af0fa36a2906a96a6b (patch) | |
tree | 6c95725fd9a35804dd7901b3d3e61e8f529c23fb /synapse | |
parent | Add some metrics to staging area (#10284) (diff) | |
download | synapse-6c02cca95f8136010062b6af0fa36a2906a96a6b.tar.xz |
Add SSO `external_ids` to Query User Account admin API (#10261)
Related to #10251
Diffstat (limited to '')
-rw-r--r-- | synapse/handlers/admin.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/synapse/handlers/admin.py b/synapse/handlers/admin.py index f72ded038e..d75a8b15c3 100644 --- a/synapse/handlers/admin.py +++ b/synapse/handlers/admin.py @@ -62,9 +62,16 @@ class AdminHandler(BaseHandler): if ret: profile = await self.store.get_profileinfo(user.localpart) threepids = await self.store.user_get_threepids(user.to_string()) + external_ids = [ + ({"auth_provider": auth_provider, "external_id": external_id}) + for auth_provider, external_id in await self.store.get_external_ids_by_user( + user.to_string() + ) + ] ret["displayname"] = profile.display_name ret["avatar_url"] = profile.avatar_url ret["threepids"] = threepids + ret["external_ids"] = external_ids return ret async def export_user_data(self, user_id: str, writer: "ExfiltrationWriter") -> Any: |