mirror of https://github.com/caronc/apprise
Page:
Notify_office365
Pages
CLI_Usage
DemoPlugin_Basic
DemoPlugin_WebRequest
Development_API
Development_Apprise_Details
Development_Contribution
Development_LogCapture
Home
Notification_Graveyard
Notify_Custom_Form
Notify_Custom_JSON
Notify_Custom_XML
Notify_Revolt
Notify_africas_talking
Notify_apprise_api
Notify_aprs
Notify_bark
Notify_boxcar
Notify_bulksms
Notify_bulkvs
Notify_burst_sms
Notify_chantify
Notify_clicksend
Notify_d7networks
Notify_dapnet
Notify_dbus
Notify_dingtalk
Notify_discord
Notify_email Fastmail
Notify_email
Notify_emby
Notify_enigma2
Notify_faast
Notify_fcm
Notify_feishu
Notify_flock
Notify_freemobile
Notify_gitter
Notify_gnome
Notify_googlechat
Notify_gotify
Notify_growl
Notify_guilded
Notify_homeassistant
Notify_httpsms
Notify_ifttt
Notify_join
Notify_kavenegar
Notify_kodi
Notify_kumulos
Notify_lametric
Notify_line
Notify_lunasea
Notify_macosx
Notify_mailgun
Notify_mastodon
Notify_matrix
Notify_mattermost
Notify_messagebird
Notify_misskey
Notify_mqtt
Notify_msg91
Notify_msteams
Notify_nexmo
Notify_nextcloud
Notify_nextcloudtalk
Notify_notica
Notify_notifiarr
Notify_notifico
Notify_ntfy
Notify_office365
Notify_onesignal
Notify_opsgenie
Notify_pagerduty
Notify_pagertree
Notify_parseplatform
Notify_plivo
Notify_popcornnotify
Notify_prowl
Notify_pushalot
Notify_pushbullet
Notify_pushdeer
Notify_pushed
Notify_pushjet
Notify_pushme
Notify_pushover
Notify_pushsafer
Notify_pushy
Notify_reddit
Notify_rocketchat
Notify_rsyslog
Notify_ryver
Notify_sendgrid
Notify_serverchan
Notify_ses
Notify_seven
Notify_sfr
Notify_signal
Notify_simplepush
Notify_sinch
Notify_slack
Notify_sms_manager
Notify_smseagle
Notify_smtp2go
Notify_sns
Notify_sparkpost
Notify_splunk
Notify_spontit
Notify_streamlabs
Notify_stride
Notify_synology_chat
Notify_syslog
Notify_techulus
Notify_telegram
Notify_threema
Notify_toasty
Notify_twilio
Notify_twist
Notify_twitter
Notify_voipms
Notify_wecombot
Notify_whatsapp
Notify_windows
Notify_workflows
Notify_wxpusher
Notify_wxteams
Notify_xbmc
Notify_xmpp
Notify_zulip
Sponsors
Troubleshooting
URLBasics
config
config_text
config_yaml
decorator_notify
persistent_storage
showcase
15
Notify_office365
Chris Caron edited this page 2024-11-30 21:14:46 -05:00
Table of Contents
Office 365 Notifications
- Source: n/a
- Icon Support: no
- Attachment Support: Yes
- Message Format: Text
- Message Limit: 32768 Characters per message
Account Setup
You will need to have a valid Microsoft Personal Account AND you will require Administrative access unfortunately (to access the Mail.Send and Mail.ReadWrite Application Permission). More details can be found here about registering your app with Azure.
- From the Azure Portal go to App Registrations (alt link)
- Click Register an application
- give any name (your choice) in Name field
- select personal Microsoft accounts only
- Click Register
- From here (the Overview panel) you can acquire both the Directory (
tenant
) ID and the Application (`client_id') you will need. - To create your
client_secret
, go to Active Directory -> Certificate & Tokens -> New client secret- The
client_secret
is an auto-generated string which may have@
and/or?
character(s) in it. You will need to encode these characters to when pasting this into your Apprise URL. See the note section above for more details on how to do this.
- The
- Now need to set permission Active directory -> API permissions -> Add permission.
- Click on Microsoft Graph
- Click on Application Permissions and search for Mail.Send; You will want to check this box too on the match found.
- Additionally grant access to the (Application Permission) Mail.ReadWrite scope to allow the sending of large attachments (> 3MB in size). Mail.ReadWrite allows Apprise to prepares a Draft message with the large attachment so that it can be sent thereafter.
- Now you're good to go. 🙂
Syntax:
o365://{source}/{tenant_id}/{client_id}/{client_secret}/
o365://{source}/{tenant_id}/{client_id}/{client_secret}/{targets}
Parameter Breakdown
Variable | Required | Description |
---|---|---|
source | Yes | The Email OR the **ObjectID associated with your Azure Account you whish to send the email from. |
tenant_id | Yes | The Tenant ID Associated with your Azure Application you created. This can also be referred to as your Directory ID. |
account_email | Yes | The Email Associated with your Azure account. |
client_id | Yes | The Client ID (also referred to as an Application ID) associated with your Azure Application you created. This can also be referred to as your Application ID. |
client_secret | Yes | You will need to generate one of these; this can be done through the Azure portal (Also documented below). |
from | No | If you want the email address ReplyTo address to be something other then your own email address, then you can specify it here. |
to | No | This will enforce (or set the address) the email is sent To. By default the email is sent to the address identified by the account_email |
Notes:
- If no
targets
are specified, then the notification is just sent to the address identified by{account_email}
- Unfortunately the
client_secret
contains a lot of characters that can drastically conflict with standard URL rules (and thus Apprise might have difficulty detecting your client secret). The?
and@
characters can get generated by Microsoft and will almost definitely cause you issues.- Consider encoding this
client secret
before putting it into your Apprise URL. Encoding the URL can be as simple as just pasting it into the form on this website. - You can also just manually escape these characters on your Apprise URL yourself manually (explained here). Simply swap all instances of:
?
with%3F
@
with%40
- Consider encoding this
Example
Send a email notification to our your Office 365 account:
# Assuming our {tenant_id} is ab-cd-ef-gh
# Assuming our {account_email} is chuck.norris@roundhouse.kick
# Assuming our {client_id} is zz-yy-xx-ww
# Assuming our {client_secret} is rt/djd/jjd
apprise -vv -t "Test Message Title" -b "Test Message Body" \
o365:///chuck.norris@roundhouse.kick/ab-cd-ef-gh/zz-yy-xx-ww/rt/djd/jjd