Google Admin SDK : Reports API Activities : Watch > Sends a tones of same notification - google-api

I have created a Gsuite channel as per this reference https://developers.google.com/admin-sdk/reports/v1/reference/activities/watch and its working fine. I can receive the webhooks for all the admin activities.
The problem is sometimes event such as "ADD_GROUP_MEMBER" or "REMOVE_GROUP_MEMBER" getting 10 to 12 times for the same user email and group email. I am also sending the response 200 for each webhooks but still, Gsuite keeps sending me the same events.
You can check on the attached events. I have received one webhook at 19:17:24 with some group member change. After 54 seconds I have again received the same event with all the same data. This happens almost 12 times. It only happens sometimes but when it happens it just hangs my server. Any idea of how can I prevent this?
Any help would be appreciated Thanks!!

Posting this just for documentation purposes.
This behaviour has been reported in Issue Tracker (I guess the author of this question reported it). Anyone who is experiencing this can keep track of the issue by clicking the star on the top left of the referenced page.
Reference:
Google Admin SDK : Reports API Activities : Watch > Sends a tones of same notification

Related

What happens to the activity if my end point is not accessible or returns a 500?

I have a Microsoft bot app that can be installed in Teams on a team.
For now, I save the tenant ID + team id in our DB when the app gets installed, via a received activity on our end point.
What happens if my prod is not up at the moment of the installation? (for whatever reason, could be an update or just a technical downtime...)
Is it lost forever? Is it retried?
Same question with a 500 error?
This activity is an example, it could be any other activity. Ex: a user is added/removed, a message has been sent etc...
For OnMembersAddedAsync; unfortunately there is no retry from the Teams side, it fires and forgets.
The information in that Activity will be included in any subsequent send from Teams - so the bot can recover, if the user interacts with the bot again. Messages would just be sent when the bot recovers.
You can find a bit more info on Teams and events here:
How do I send a 1:1 welcome message?

Microsoft Bot send the response twice in Teams

I've used Microsoft bot framework SDKv4, and integrated to Teams channel. It is running well, but giving responses twice.
But, I didn't get the same behavior, while I tested it on Emulator and Web Chat in Azure Portal.
However, I can see below issue, while I ping the bot in web chat and get a response.
Further, I can also see, that its always 'sending' as a status although I got a valid response, and the status later changes to "Send Failed. Retry"
Is the issue related to my teams integration for getting message twice? and how, should I fix it!
Are you using webhooks? If so, having multiple webhooks with same ID could be the reason for double messages. Hope this helps
I made my bot working. It was the issue of MS authentication!
I had a call with MS support person and the root cause appeared to be only the MS authentication. Had to reset app secret and then re-deloyment.
Its weird that, although it was not getting authenticated primarily yet it was returning me the response. This, I still haven't got it!

Error 550 5.7.708 when creating Calendar Events via the Graph API

When creating Calendar Events via the Graph API, the events are created correctly in the calendar of the organizer but the invites to the participants get bounced. The organizer gets a 'Delivery has failed...' message with the following error message:
Remote Server returned '550 5.7.708 Service unavailable. Access denied, traffic not accepted from this IP. For more information please go to http://go.microsoft.com/fwlink/?LinkId=526653 AS(7171)
Sending emails manually through Outlook (web) from the organizer to the participants works fine.
The issue is intermittent. After changing the DNS server, everything worked fine for some time.
I checked https://protection.office.com/restrictedusers as suggested in the answers to similar posts, but this list is empty.
I also tried delisting the IP address (my own?) through https://sender.office.com/, but to no avail.
The tenant is linked to the Microsoft Developer Program and would allegedly have a 'bad reputation'. However, I don't understand how that would explain the fact that it sometimes works and sometimes doesn't when sending exactly the same API request and hence 'triggering' exactly the same emails...
I think the best way to overcome this would be to add a domain to your developer tenant as per the guidance here:
https://learn.microsoft.com/en-us/Exchange/mail-flow-best-practices/non-delivery-reports-in-exchange-online/fix-error-code-5-7-700-through-5-7-750#57750-client-blocked-from-sending-from-unregistered-domain
Add and validate all domains in Office 365 that you use to send email messages. For more information, see Add a domain to Office 365.
I'm not guaranteeing this will resolve it. You have to understand that those developer tenants are only meant for experimentation and so there are checks and balances to ensure they are used in a bad manor.
How many emails are you sending through this tenant?
Calendar events are sent out via email. Add the "Mail.Send" permission to you App Registration.
This solved it for me.

MS Teams bot no longer receives messages

After moving MS Teams bot to another server, it no longer replies to messages. It still successfully sends proactive messages on its own, however responding to messages no longer works. Messaging endpoint stayed the same (only IP changed)...
I watched for network activity when clicking a button in adaptive card (posted by bot) and error 502 is reported with {"errorCode":1008,"message":"Invoke agent action failed with status code: BadGateway"} returned. I'd appreciate any ideas how to sort this out... Thank you.
If the IP / URL of your bot changed you need to make sure to update the messaging endpoint in the bot definition.
If you registered your bot in dev.botframework.com or azure there's a setting "messaging endpoint url" which you need to update and point to the new ip.
If just the IP behind your URL changed, it might be some caching/dns issue on MS Teams end. Did you try to reinstall the bot completely?

In-App Billing subscription issues

With the release of the new subscription option from In-App Billing API we started a proof of concept of the service and we found a few issues. Has anyone else tried it and would have some answers for us? Here's the issues we have been facing so far:
1 – While testing the unsubscribe functionality, the Google Play interface displays a white page with an “Item not found” message and a retry button. Is it due to the fact the app is not yet published? If yes, how can we test this flow without publishing it first?
2 – Inter device synchronization. When making a subscription on one device, other devices tied to the same account did not receive a OnPurchaseStateChange event. Is it again due to the fact the app is not published? Or are subscriptions tied to a particular device and not to an account?
3 – On our Google merchant page, when we cancel a purchase, the device does not receive a notification telling the subscription has been cancelled. Is this a bug? As a workaround we are manually checking the current time and comparing with the expiration date to force a restore transactions call. At this point, we are able to see the subscription is no longer valid. Do you think this is an acceptable solution?
4 – When a subscription is made, two transactions show up on the Google Merchant page: a FAILED transaction with a value of $0 and a valid one with the value we charged. Is this the expected behavior? What’s the purpose of the $0 FAILED transaction?
If anyone has faced similar issues we would like to know. Maybe these could be bugs on Google's end or maybe we did not understand 100% how it is supposed to work.
Thanks in advance.
1.I had the same issue and after I published (and later unpublished) my app I could see the app page in the market,so you can publish and than unpublish.
2.I didn't check it with subscriptions ,but for managed item i didn't get purchaseStateChange on two different devices as expected.
3.I do get subscription expired after canceling one,but only after a while.
I didn't understood how you can get the expiration date ?
you only can get it with access to play developer api.
the restore transactions will give you same purchaseStateChange as you got when purchase the item.
*in the developer guide it is recommanded to use restore transactions only in first app use.
4.I have same issue,and i heard at least about 10 people with same 0$ charge.

Resources