Open pipedream-component-development opened 8 months ago
Hi Team,
We would like to be able to select scopes when using pipedream. Currently when trying to make requests we get the following errors.
AxiosError - Request failed with status code 403 {"error":{"code":"Forbidden","message":"Missing scope permissions on the request. API requires one of 'TeamworkDevice.Read.All, TeamworkDevice.ReadWrite.All'. Scopes on the request 'Calendars.Read, Calendars.Read.Shared, Calendars.ReadWrite, Calendars.ReadWrite.Shared, Directory.ReadWrite.All, email, Files.Read, Files.Read.All, Files.ReadWrite, Mail.Send, Notes.ReadWrite.All, openid, profile, Sites.ReadWrite.All, Tasks.Read, Tasks.Read.Shared, Tasks.ReadWrite, Tasks.ReadWrite.Shared, Team.ReadBasic.All, User.Read, User.ReadWrite.All'","innerError":{"date":"2024-01-19T03:29:58","request-id":"50f37c57-4fd4-402c-a551-6727c55b92cb","client-request-id":"50f37c57-4fd4-402c-a551-6727c55b92cb"}}}
The code we are trying to run is as follows:
import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
microsoft_graph_api: {
type: "app",
app: "microsoft_graph_api",
}
},
async run({steps, $}) {
return await axios($, {
url: https://graph.microsoft.com/beta/teamwork/devices/
,
headers: {
Authorization: Bearer ${this.microsoft_graph_api.$auth.oauth_access_token}
,
},
})
},
})
Hi @nule56 , can you try using the Microsoft Teams Admin app which has the TeamworkDevice.Read.All
scope that you're looking to use? Let me know if this works for you!
Hi @malexanderlim, we get the following error when using the Microsoft Teams Admin app.
The Cisco Webex integration on pipedream was recently modified to allow us to select the scopes we required for the integration. Would it be possible to have a Graph API integration similar, so that we can select the scopes?
Hi @nule56 , I've fixed the scopes issue with the Microsoft Teams Admin app - let me know if this would work for your use case.
If the desire is to create your own application, similar to the Cisco Webex (Custom App) setup, I'll have to do a bit more research to see how this would work, as the process of setting up a custom app on the Microsoft Graph side is a lot more involved than with Cisco Webex.
@malexanderlim Yes, we would like to have something similar to the Cisco Webex (Custom App) setup.
@malexanderlim @vunguyenhung are you able to provide an update on this feature request?
App
Microsoft Graph API https://developer.microsoft.com/en-us/graph