Limit on generating emails via Microsoft Graph - microsoft-graph-api

We are developing a solution that collects users emails (users are employees of the our client company) from Outlook and, based on these emails, calculates metrics, determines user burnout, etc. We are trying to create a test stand for load testing. by generating emails for test users. We use methods https://learn.microsoft.com/en-us/graph/api/user-post-messages?view=graph-rest-1.0&tabs=http and https://learn.microsoft.com/en-us/graph/api/user-sendmail?view=graph-rest-1.0&tabs=http.
But we have a problem: we receive emails from Microsoft that it is impossible to send more than 10,000 mails per day from one mailbox. How to get around this limitation? It prevents generating data for the test stand

Related

Read all Emails In a Domain For Office365

I want to read all emails in my domain against a query using Office365 Outlook API. Currently, I am enumerating one user at a time and extracting all the emails for it
https://graph.microsoft.com/v1.0/{userId}/messages
This approach is not scalable as in the case of 1000+ users it will take a lot of time. I want to extract the emails for all users against a query but without enumerating individual users.

MS Bookings Graph API send to multiple participants

We have been extensively using graph API's and Bookings and have a request for scheduling group sessions through Bookings. Currently, we think we can only do this by recursively generating a booking for each person. We would like to be able to specify a list in the JSON when creating it.
Use Case is for a group therapy session that will have multiple people.
Part two of the request is to be able to publish a booking event and allow multiple external users to sign up to attend.
All tips and guidance welcome.
Thanks!
Create an Azure AD based application and choose the Identity flow suits you
Get the access token from Azure AD
With the token make Graph API calls (Bookings/Calendar) based on your application logic and send to multiple participants...
In addition, even you can think about considering Azure A2C scenario as well, so that you can allow multiple external users to sign up to attend.
You confirmed that you're trying the BETA version of the Bookings graph API Batch calls
and that seems to be working.

Keeping data in sync between IdentityServer and application

I use IdentityServer4 (with Asp.Net Core Identity) as a centralized auth point for multiple applications.
In one of the applications I want to setup a scheduled job to send out e-mail notifications to multiple users. When the job will execute, it will have no access to user claims (as it will execute not in the context of a single user request) and thus there will be no place to read user's e-mail from. This means I will have to duplicate e-mails in the application DB.
But how to keep e-mails in sync between the app and the IdentityServer if some user wants to change it?
A good approach would be to implement integration events in your system. This is a mechanism that raises an event 'This special thing happend', and allows other parts of your system to be notified.
You can use RabbitMQ or Azure ServiceBus for example to send messages to. Every system being subscribed to that kind of message, will receive it.
So in your case, you would create an event called UserChangedEmailAddressIntegrationEvent for example. Then in your emailing system, you subscribe to exact this event. Once it's raised, your emailing system will receive the message and be able to handle it.
The UserChangedEmailAddressIntegrationEvent could in fact be a class, containing (for example) two properties, OldEmail and NewEmail so the emailing system knows what value to change.
See the eShopOnContainers example project, which has this exact technique implemented
https://github.com/dotnet-architecture/eShopOnContainers
We have faced a similar problem where we had Hangfire jobs running that would extract reporting data from our system and then email the reports to the set of users configured when creating the scheduled job.
We also used Identity Server 4 with ASP.Net Identity and ended up storing the user id's on the scheduled job info. We then also created an api endpoint on our ASP.Net Identity that would serve back the required user info given user id (or a list of user id's). Lastly, we used client_credentials and created a client to consume that api during the job execution that would retrieve appropriate user info at a given point in time from our ASP.Net Identity api.
Such approach has worked well for us so far and it removed the pain of having to think about how to ensure data syncing all together.

Can I create alerts on document folders using MS Graph API?

When you view document folders in a SharePoint online site you have the ability to configure email alerts on folders based on when items are added or deleted. Can I do the same thing via the Microsoft Graph API? If this is not possible now, is there any plan to add this to the API in the near future? The only workaround I have been able to come up with involves using the Delta API to poll for changes periodically, but that requires a lot of processing as the Delta API is not very granular.
You do this using webhooks and registering a subscription against the resource you want to monitor.
See Using webhooks to receive service-to-service notifications for details and examples of how this works.

Bulk email sender and list management API

I'm looking for a way to programmatically manage email lists and send large numbers of emails to these lists. The general idea would be similar to how social networking sites send email notifications when a friend posts new content. Since a user could have tens of thousands of followers, it doesn't seem realistic to send these directly from my application so I'm curious if there's a good way to handle this through a service provider. My company is using Google apps but I'm not an expert on their API. Our environment is ASP.NET MVC.
Any advice is most appreciated!
MailChimp provides API access to their customers, allowing you to manage lists and send out campaigns.

Resources