0

Query an individual organization member

by
Published Oct 17, 2025

Query an individual organization member with a SCIM User GET Request. - The `name` object will contain fields `firstName` and `lastName` with the values of `N/A`. Sentry's SCIM API does not currently support these fields but returns them for compatibility purposes.

Script sentry Verified

The script

Submitted by hugo697 Bun
Verified 235 days ago
1
//native
2
/**
3
 * Query an individual organization member
4
 * Query an individual organization member with a SCIM User GET Request.
5
- The `name` object will contain fields `firstName` and `lastName` with the values of `N/A`.
6
Sentry's SCIM API does not currently support these fields but returns them for compatibility purposes.
7
 */
8
export async function main(auth: RT.Sentry, member_id: string) {
9
	const url = new URL(
10
		`https://${auth.region}.sentry.io/api/0/organizations/${auth.organizationSlug}/scim/v2/Users/${member_id}`
11
	)
12

13
	const response = await fetch(url, {
14
		method: 'GET',
15
		headers: {
16
			Authorization: 'Bearer ' + auth.token
17
		},
18
		body: undefined
19
	})
20
	if (!response.ok) {
21
		const text = await response.text()
22
		throw new Error(`${response.status} ${text}`)
23
	}
24
	return await response.json()
25
}
26