//native
/**
* Query an individual organization member
* 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.
*/
export async function main(auth: RT.Sentry, member_id: string) {
const url = new URL(
`https://${auth.region}.sentry.io/api/0/organizations/${auth.organizationSlug}/scim/v2/Users/${member_id}`
)
const response = await fetch(url, {
method: 'GET',
headers: {
Authorization: 'Bearer ' + auth.token
},
body: undefined
})
if (!response.ok) {
const text = await response.text()
throw new Error(`${response.status} ${text}`)
}
return await response.json()
}
Submitted by hugo697 235 days ago