Hello, I am new to Typescript and am having a problem. I have a async/await method and what is interesting is that I get a response back, and that response has a value, but when I try to access that value it says undefined. What am I doing wrong?
await client.Get<User>("/users?$filter=startswith(redacted)").then(user => {
const userId = user[0].id;
client.Get<string>(/users/${user[0].id}/mailFolders)
})
user will be defined and show properties. but when I try to assign UserID equal to one of those properties, that variable is undefined.