//native
/**
* Get Current User
* Get the profile of the connected account (id, display name, mail, user principal name). Requires User.Read (a connection default).
*/
export async function main(auth: RT.MsOutlook) {
const response = await fetch("https://graph.microsoft.com/v1.0/me", {
headers: {
Authorization: `Bearer ${auth.token}`,
Accept: "application/json",
},
})
if (!response.ok) {
throw new Error(`${response.status} ${await response.text()}`)
}
return await response.json()
}
Submitted by hugo989 2 hours ago
//native
/**
* Get Current User
* Get the profile of the connected account (id, display name, mail, user principal name). Requires User.Read (a connection default).
*/
export async function main(auth: RT.Outlook) {
const response = await fetch("https://graph.microsoft.com/v1.0/me", {
headers: {
Authorization: `Bearer ${auth.token}`,
Accept: "application/json",
},
})
if (!response.ok) {
throw new Error(`${response.status} ${await response.text()}`)
}
return await response.json()
}
Submitted by hugo989 11 hours ago
//native
/**
* Get Current User
* Get the profile of the connected account (id, display name, mail, user principal name). Requires User.Read (the connection default).
*/
export async function main(auth: RT.Outlook) {
const response = await fetch("https://graph.microsoft.com/v1.0/me", {
headers: {
Authorization: `Bearer ${auth.token}`,
Accept: "application/json",
},
})
if (!response.ok) {
throw new Error(`${response.status} ${await response.text()}`)
}
return await response.json()
}
Submitted by hugo989 11 hours ago