Microsoft Graph update subscription always results in 403 Forbidden error - microsoft-graph-api

Using Microsoft Graph I am successfully creating subscriptions, but when calling HTTP Patch to https://graph.microsoft.com/v1.0/subscriptions/ with a correct (works through Graph Explorer) json payload of
{ "expirationDateTime": "UTCTIME 2 minutes past current expiration"}
I always get 403 Forbidden as a result.
I have the permissions set (I think) correctly to Files.ReadWrite as per https://developer.microsoft.com/en-us/graph/docs/api-reference/v1.0/api/subscription_update. These should be the same permissions as Creating the subscription so can someone help as to why I can create but not update?

The problem you reported should be fixed now. Please let me know if you're still seeing 403s on subscription update requests.

You should set the permission on project config but not only the apps.dev.microsoft or azure app portal.
If you not sure which config file to set, just get started from the official sample code, or just find the keywords "GraphScope" in your project and add the Files.ReadWrite.All.
You get 403 mainly caused by some wrong config. Still need to check on your side. We can just provide the suggestion to assist you.

Related

Whatsapp Cloud - Product Catalog - Batch APIs not working

We need to create, update or delete product(s) from our catalog.
For doing this programatically we are following Meta's Product Catalog Batch API documentation in which there is an endpoint mentioned as "<product_catalog_id>/batch". We are trying to make request at this endpoint by passing the payload as mentioned in the official documentation.
But I am getting "403 forbidden" error every time. On digging deeper I found that the access token which is making this API call must have 2 permission i.e. "catalog_management" and "business_management".
I have checked the access permission for my access token and it indeed has there 2 permissions.
Can anybody please help here?
I am attaching some links below, which I am using to make the batch API calls for product catalogs.
Using this link to understand the API structure = https://developers.facebook.com/docs/marketing-api/catalog-batch/guides/send-item-updates/
Using this link to make the required payload = https://developers.facebook.com/docs/marketing-api/catalog-batch/reference/
I tried generating new access tokens 2 or 3 times. I also tried changing the payload to check whether the documentation may be outdated but nothing helped me to solve this issue.
I am expecting that the product catalog batch API works, so that we can update the products from our side.

Graph API fails for Archive mailboxes

I've been using the Microsoft Graph API to access Exchange Online (Office365) In-Place Archives.
It's basically an authenticated GET HTTPS request against https://graph.microsoft.com/v1.0/users/user#company.onmicrosoft.com/mailFolders/ArchiveMsgFolderRoot and it used to work fine.
Starting this week (end of April 2020), the same request against the same resource (no change) started failing with:
404 Response: {'error': {'code': 'ErrorInvalidMailboxItemId', 'message': "Item Id doesn't belong to the current mailbox.", 'innerError': {'request-id': '4a339242-9821-42a9-9622-4b1f7cd2c162', 'date': '2020-04-24T10:01:35'}}}
Other mailboxes (not ArchiveMsgFolderRoot) continue to work fine, no problem there. Only In-Place archives are affected.
How do you access In-places Archives from the Graph API now? Can you share an example?
Same here. We are trying to figure out what exactly changed on MS side.
MS removed support for In-Place Archives in API. All options on the internet are not working anymore. We are implementing a workaround.
Support of ArchiveMsgFolderRoot was never an official feature. There was an announcement that archiving is going be changing coming time.

Unable to get channels using graph api

while fetching channels from the team using graph API is not working. It is not working from today. I am getting the following exception.
https://i.stack.imgur.com/tA1Qv.png
I tried the same with code that worked just fine 3h ago to get channels from a specific team. Now I'm getting the same exception. Same Exception when using Graph-Tester.
Coworker tried it aswell with Graph-Tester, apparently it works just fine for her. Seems like its user related. Propably a bug on Microsofts side.
It seems that it could be a bug. I'm confirming that right now GET /teams/[-groupid-]/channels fails for Delegated permission type requests, both for v1.0 & beta with a 400 Bad Request "Failed to execute Skype backend request GetThreadS2SRequest."
However, it's working for me (200) when I use Application permission type in Postman.
It was fixed by the Microsoft Graph team. Now it's working fine. It's not the only problem with channels. It's a problem with team endpoint API. The graph team is fixed the API related issue.

Unable to be connected to Quickbooks through Intuit App Centre | Playground

Does this link work?
https://appcenter.intuit.com/Playground/OAuth/IA
I am trying to get my QB online token secret required for working with a ruby gem. I have a valid QB account and I have entered my app's consumer key & secret. All I am trying to do is follow the instructions required to get the example app working from
https://github.com/minimul/qbo_api
Every time I click on the Connect to Quickbooks button, I just get an error message.
Oops! An error has occurred.
Please close this window and try again.
Error Code: no_access_to_this_field
Message: Team Intuit IA Application not allowed to get access to QuickBooks
I have changed the urls in my app and I still cannot get past the error message. I am at a loss since this seems to be a very basic step to start working with the gem. Please tell me the newbie mistake I am making.
Is there any other SDK I need to install? I do not have a Desktop version...just the online version.
So if anyone here happens to not figure out this answer already, its because I set the "Access Token Duration:" option on the Intuit Playground to 120 seconds...the default option.
I changed it to 1200 seconds by mistake, and the login works just fine now! I don't understand why that works, so if someone could answer that I could understand it better!
Thanks #William Lorfing
This can happen if you are using the playground to generate Oauth tokens for either QuickBooks or Payments access and you are not setting the correct data source.
See the answer here: https://intuitdeveloper.lc.intuit.com/questions/1247785
regards
Jarred

YouTube Analytics API : 403 Forbidden Error returns Earnings Report

I have a CMS account an I'm trying to get earnings data from content owners report on Analytics API using OAuth 2.0 . Whenever I'm trying to do this through my website, I get the following error ;
Error calling GET https://www.googleapis.com/youtube/analytics/v1/reports?ids=contentOwner%3D%3DContentOwnerID&start-date=2005-01-01&end-date=2015-11-26&metrics=views%2Cearnings%2Clikes%2Cdislikes%2Cshares%2Ccomments&dimensions=30DayTotals&filters=channel%3D%3DChannel_ID: (403) Forbidden
I'm doing the same thing on TRY IT page and it works fine.
I'm thinking that I'm having issues with authenticating my domain. What do you think is the problem? How can I solve this issue?
Thank you,
403 means nobody has access to a page. As you noticed, you may have access to a similar page, but not to this one. It is not a matter of authentication. Authentication problems give a status 401 (meaning it can be fixed by adding proper authentication); 403 cannot be fixed.
Finally, I solved the problem..
Whoever will have this issue, please use the CMS user's OAuth 2.0 credentials instead of using channel credentials..

Resources