1# Data Discovery Guide
2
3How to find IDs and data buried in Microsoft Teams.
4
5## "How do I find which teams I'm in?"
6
7```bash
8exo-teams list-teams
9```
10
11Output shows team names and all their channels with IDs. The group ID (for SharePoint/files) is in the JSON:
12```bash
13exo-teams list-teams --json | jq '.[].teamSiteInformation.groupId'
14```
15
16## "How do I find a channel ID?"
17
18```bash
19exo-teams list-teams
20# Look for: #channel-name 19:abc123@thread.tacv2
21```
22
23Channel IDs look like `19:abc123@thread.tacv2`. Pass them directly to `get-messages`.
24
25## "How do I find a conversation/chat ID?"
26
27```bash
28exo-teams list-chats
29# Look for: [DM] Person Name 19:abc@unq.gbl.spaces
30```
31
32Chat IDs look like `19:abc@unq.gbl.spaces`. Pass them to `send`, `get-chat`, `mark-read`, `send-file`.
33
34## "How do I find a file in SharePoint?"
35
36```bash
37# List default drive
38exo-teams files "Team Name"
39
40# List a specific subfolder
41exo-teams files "Team Name" --path "General/Week 1"
42
43# See class materials (education teams)
44exo-teams files "Team Name" --drive "Class Materials"
45
46# See ALL drives at once
47exo-teams files "Team Name" --all-drives
48```
49
50The file path shown in `files` output is what you pass to `--path` for `download`.
51
52## "How do I find assignment details?"
53
54```bash
55# List all classes
56exo-teams assignments --classes
57
58# List all assignments with status
59exo-teams assignments
60
61# Get full JSON including classId, assignment ID, submission ID
62exo-teams assignments --json
63```
64
65Assignment status icons:
66- `[ ]` - not submitted
67- `[~]` - working / in progress
68- `[x]` - submitted
69- `[>]` - returned (graded)
70
71## "How do I check unread messages?"
72
73```bash
74# Quick overview
75exo-teams unread
76
77# Full list with IDs
78exo-teams list-chats
79# * prefix = unread
80```
81
82Unread is based on `isRead == false` in chat metadata. Note: `isRead` can be null (treated as read) or bool.
83
84## "How do I find someone's user ID?"
85
86```bash
87# Try new-dm - it will print the found user ID to stderr
88exo-teams new-dm "their name" "test" 2>&1 | head
89# stderr: found user: Alice Smith (alice@school.edu)
90# stderr: conversation created: 19:...
91
92# Or search via JSON
93exo-teams list-chats --json | jq '.[].members[] | select(.friendlyName | test("Alice"))'
94# Returns: {"mri":"8:orgid:uuid-here","friendlyName":"Alice Smith","role":"User"}
95```
96
97MRI format is `8:orgid:<uuid>`. The UUID is the Azure AD object ID used in Graph API calls.
98
99## "How do I find what I submitted for an assignment?"
100
101```bash
102exo-teams assignments --json | jq '.[] | select(.displayName | test("Essay")) | {status: .submissionStatus, submitted: .submittedDateTime, resources: .submittedResources}'
103```
104
105Or just run `exo-teams assignments` - submitted resources are printed under each assignment.
106
107## "How do I see all my classes?"
108
109```bash
110exo-teams assignments --classes
111# Output: ClassName class-uuid
112```
113
114The class UUID is what the assignments API uses internally.
115
116## ID Format Reference
117
118| ID type | Format example | Where to get it |
119|---------|---------------|-----------------|
120| Channel ID | `19:abc@thread.tacv2` | `list-teams` |
121| Chat/DM ID | `19:abc@unq.gbl.spaces` | `list-chats` |
122| Group ID (team) | UUID | `list-teams --json` -> `teamSiteInformation.groupId` |
123| User MRI | `8:orgid:uuid` | `list-chats --json` -> `members[].mri` |
124| Class ID | UUID | `assignments --classes` |
125| Assignment ID | UUID | `assignments --json` -> `id` |
126| Submission ID | UUID | `assignments --json` -> `submissionId` |