with Microsoft Dataverse and Autotask PSA?
import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
microsoft_dataverse: {
type: "app",
app: "microsoft_dataverse",
}
},
async run({steps, $}) {
return await axios($, {
url: `${this.microsoft_dataverse.$auth.environment_url}/api/data/v9.2/WhoAmI`,
headers: {
Accept: `application/json`,
Authorization: `Bearer ${this.microsoft_dataverse.$auth.oauth_access_token}`,
"OData-MaxVersion": `4.0`,
"OData-Version": `4.0`,
"Accept": `application/json`,
},
})
},
})
import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
autotask_psa: {
type: "app",
app: "autotask_psa",
}
},
async run({steps, $}) {
return await axios($, {
url: `${this.autotask_psa.$auth.url}V1.0/ClientPortalUsers/query`,
headers: {
"UserName": `${this.autotask_psa.$auth.username}`,
"Secret": `${this.autotask_psa.$auth.password}`,
"ApiIntegrationCode": `${this.autotask_psa.$auth.api_integration_code}`,
},
params: {
search: `{
"filter": [
{
"op": "gt",
"field": "id",
"value": "1"
}
]
}`,
},
})
},
})