Testing the Outlook REST API leads to suspended account issue - node.js

I'm trying to integrate Outlook Mail with a web app I'm working on. I need to do some tests with the API during the development. I'm using the node-outlook library in my NodeJS app. However, after sending a few test emails to both real and dummy addresses, I encountered the following error:
"REST request returned 530; body: {"error":{"code":"ErrorAccountSuspend","message":"Account suspended.
Follow the instructions in your Inbox to verify your account., WASCL
UserAction verdict is not None. Actual verdict is Suspend,
ShowTierUpgrade."}}"
It seems that Microsoft detected unusual activity with my account and suspends the account. I followed the directions and verified my account in a process that included mobile phone verification. It seemed the problem was resolved.
Now, I see that I can read the messages through the API, however I cannot use the API to send new emails or send draft emails. Also it seems I cannot send emails in the Outlook web app, too. I receive the same "suspended account" error.
One question is how can I solve this problem? Do any restrictions of "suspended account" error remain in place even after verifying the account and resolving the problem?
Another general question is, how can I do different tests with the Outlook API during development, without causing this "suspended account" error? I did much more tests with the Gmail API without any such problems.

Related

Unknown Get calls are received and logged in Azure APIM

I have an instance of APIM which hosts multiple APIs. This include multiple post operations.
I have observed many Get calls being logged for the endpoint which are actually Post. I verified from client who uses it and they are not making any get calls for the same. When I searched IPs logged in app insights it belongs to Microsoft.
Where the actual API is post operation as shown below
May I know why these get calls are made? Is there any possibility these are from APIM?
I raised Microsoft ticket to understand why we are getting unknown Get calls. They analyzed IP address where its coming from then they got to know its coming from Microsoft Teams. If somebody post URL in Teams, then Teams trying to render the url in order to get some information to show in the chat. In this attempt it makes a Get calls

Azure Logic Apps - When a new email arrives workflow does not trigger

I'm trying to create an Azure Logic App Workflow to extract attachments when email arrives.
I have a workflow on my account to generate Logic App design.
This workflow is directly paste in our azuredeploy.json file to be deploy with our pipeline on the Azure Logic App main account.
This workflow works perfectly on my app but not in the deployed app. In the deployed app, when I send an email to test the workflow, it does not trigger the event like it does in my account.
It seems that our issue came from the office365 email that we specially created (which is different from ours) the be used to get email with attachments.
And now I just tried with the trigger "When a new email arrives in a shared mailbox" and it work exactly as expected. But it's not a shared mailbox !
Has anyone encountered this issue before?
I believe you have created your connection to Office 365 (Outlook) using your own account, which would explain why it works for you, and the Shared Mailbox (which only requires one having access to it).
However, your scenario requires the "delegated permissions" model, for which Graph API is better suited.
May I kindly suggest you read https://learn.microsoft.com/en-us/azure/connectors/connectors-native-http

API call for "Check mail from other accounts > Check mail now"?

Is there an Gmail API call that corresponds to "Check mail from other accounts > Check mail now"?
Neither Gmail API nor Apps Script's GmailApp have a way to force to update the messages from the other accounts pulled with POP3.
There may be an easy way to update those accounts from the app. Asking how to do this may bring people that knows how to do so and may be able to help you (but that know nothing about Gmail API) :)
As a side note, if you don't find a way of doing it, you may request Google to implement a refresh method in their Gmail API.
References
Gmail API resource summary (Gmail API reference)
Class GmailApp (Apps Script reference)
Getting started (Google Issue Tracker documentation)

Auth error trying to connect to Gmail from C# app, but no security alert email

I'm building a prototype web site to show a client, and need to connect to Gmail to access emails. For simplicity (as this is a prototype) I am trying to connect using the email and password for a throwaway Gmail account I created. Full security will come later, when we (hopefullly) get the agreement for the full app.
I'm using Mailkit, and the code is as follows...
ImapClient client = new();
await client.ConnectAsync("imap.gmail.com", 993, SecureSocketOptions.SslOnConnect);
await client.AuthenticateAsync(userName, password);
The first time I tried this from my local machine, the auth failed, and a "Security alert" email was sent to the Gmail account saying that a new device had tried to log in. It gave me the option to check the activity, and confirm that the new device was actually me.
After that, I was able to run the code from my local machine without problem.
Another developer just checked out my changes and tried it on his machine, and got an auth failed exception. Understandable, as his device hasn't been used for this before. However, this time, the Gmail account didn't receive a "Security alert" email, so he had no way of telling Google that his device was to be trusted.
I then deployed the site to a test server, and had the same problem.
Anyone any idea why we don't get a "Security alert" email for the other dev's machine or for the test server? More to the point, any idea how we tell Google to trust these two devices? I don't have the resources to add OAuth to this prototype at this stage.
The Imap log is shown below.
Thanks
Imap log
Connected to imaps://imap.gmail.com:993/
S: * OK Gimap ready for requests from 185.160.182.96 n14mb29765764wrp
C: A00000000 CAPABILITY
S: * CAPABILITY IMAP4rev1 UNSELECT IDLE NAMESPACE QUOTA ID XLIST CHILDREN X-GM-EXT-1 XYZZY SASL-IR AUTH=XOAUTH2 AUTH=PLAIN AUTH=PLAIN-CLIENTTOKEN AUTH=OAUTHBEARER AUTH=XOAUTH
S: A00000000 OK Thats all she wrote! n14mb29765764wrp
C: A00000001 AUTHENTICATE PLAIN AG5vd2l0c21pbmUyMDIwQGdtYWlsLmNvbQBIZXl5b3VBbmRtZTEy
S: * NO [WEBALERT https://accounts.google.com/signin/continue?sarp=1&scc=1&plt=AKgnsbsNd6RU3LIlgDfhmL9Y7ywYhtagFig_xfuSJCUHD9Eg3XqN8DKlDk3G8jmj2w5viIm5PDC3BS4SVy7iFMB6g1244cnQt1E60EdOTSEpnqDzL6FH2L-ReOAyZ3qkSXZQZs2pIfL2] Web login required.
S: A00000001 NO [ALERT] Please log in via your web browser: https://support.google.com/mail/accounts/answer/78754 (Failure)
Gmail has this security feature where it requires you to login first via a web browser on the machine before it will let you connect via IMAP.
You might be able to work around this by going to the gmail settings and creating a app-specific password for your app to use.
Also, MailKits FAQ has a section about what settings to change in order to allow “less secure apps” to authenticate. Not sure if you did those steps yet.
Can you also file a feature request for MailKit to add support for Gmail’s [WEBALERT …] response code? From a quick glance, I think that may be something MailKit could parse and emit an event for (not that it would help your app that much in this case, but maybe useful to have anyway?)

Not receiving event notification from DocuSign API

I am using the DocuSign Rest API v2. During envelope creation process, we will send our rest API URL to receive the notifications.
The events are properly receiving in our live setup. But in our local development setup we are not receiving the notifications.
For this, we have whitelisted the IP ranges mentioned in the DocuSign Page on our side.
https://trust.docusign.com/en-us/trust-certifications/ip-ranges/
But still, we are not receiving notifications to the development setup.
What else we need to do to get this done?
Unfortunately I'm unable to respond to the original post, however I've experienced the same issue (reported here). It only appears to occur when envelopes are sent as far as I can tell, and I'm able to retrieve the status afterwards - but it's not in line with what the API guide tells us, nor what was happening previously.

Resources