import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
office_365_management: {
type: "app",
app: "office_365_management",
}
},
async run({steps, $}) {
return await axios($, {
url: `${this.office_365_management.$auth.api_endpoint}/api/v1.0/${this.office_365_management.$auth.tenant_id}/activity/feed/subscriptions/list`,
headers: {
Authorization: `Bearer ${this.office_365_management.$auth.oauth_access_token}`,
},
})
},
})
Office 365 Management uses OAuth authentication. When you connect your Office 365 Management account, Pipedream will open a popup window where you can sign into Office 365 Management and grant Pipedream permission to connect to your account. Pipedream securely stores and automatically refreshes the OAuth tokens so you can easily authenticate any Office 365 Management API.
Pipedream requests the following authorization scopes when you connect your account:
User.ReadActivityFeed.ReadActivityFeed.ReadDlpServiceHealth.ReadGEThttps://login.windows.net/common/oauth2/authorize?client_id={{oauth.client_id}}&redirect_uri={{oauth.redirect_uri}}&state={{oauth.state}}&response_type=code&scope={{oauth.space_separated_scopes}}&resource=https://manage.office.comPOSThttps://login.windows.net/common/oauth2/tokencontent-type: application/x-www-form-urlencodedaccept: application/jsonresource: https://manage.office.comclient_id={{oauth.client_id}}&client_secret={{oauth.client_secret}}&redirect_uri={{oauth.redirect_uri}}&grant_type=authorization_code&code={{oauth.code}}POSThttps://login.windows.net/common/oauth2/tokencontent-type: application/x-www-form-urlencodedaccept: application/jsonclient_id={{oauth.client_id}}&client_secret={{oauth.client_secret}}&grant_type=refresh_token&refresh_token={{oauth.refresh_token}}