The Office 365 Management APIs provide a single extensibility platform for all Office 365 customers' and partners' management tasks.
Go to siteimport { 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.Read
ActivityFeed.Read
ActivityFeed.ReadDlp
ServiceHealth.Read
GET
https://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.com
POST
https://login.windows.net/common/oauth2/token
content-type: application/x-www-form-urlencoded
accept: application/json
resource: https://manage.office.com
client_id={{oauth.client_id}}
&
client_secret={{oauth.client_secret}}
&
redirect_uri={{oauth.redirect_uri}}
&
grant_type=authorization_code
&
code={{oauth.code}}
POST
https://login.windows.net/common/oauth2/token
content-type: application/x-www-form-urlencoded
accept: application/json
client_id={{oauth.client_id}}
&
client_secret={{oauth.client_secret}}
&
grant_type=refresh_token
&
refresh_token={{oauth.refresh_token}}