Microsoft Graph - recent endpoint not returning recently used files - microsoft-graph-api

According to the documentation /me/drive/recent endpoint returns the list of recently used items by the signed in user.
However, regardless of the activity of the user, I couldn't get the list of recent files. I keep seeing the same response: empty response for personal account and some items that are unrelated to the user's activity for business account.
There is another enpoint /me/insights/used that returns exactly what I need. However, it is under beta and, what is more, it works only for business account.
How do I get recent files for both personal and business account?
Is there something wrong with /me/drive/recent endpoint?

Related

Cannot get joined teams using Graph for external users using mail identity

I am attempting to use "v1.0/me/joinedTeams" to get all the joined teams for the currently authenticated user in my asp.net service. This works fine for external accounts that use a Microsoft identity (have a live account) but the same call returns a 400 Bad Request when I attempt to use an external account that uses a mail identity (no live account). The request is the same regardless of external account type. The token generated when authenticating as the mail identity external user looks correct when I inspect it.
I have been able to implement a workaround where I instead use the SharePoint REST service to get the groupId for the team site the user is apart of and then use the Graph call "v1.0/teams/{groupId}" to get that team. However, I need to do this for all the teams the external user has access to which slows things down quiet a bit.
I am aware of what looks like a bug in Graph when trying to make any Graph calls with any external user type, described here: https://github.com/OneDrive/onedrive-api-docs/issues/1039. I have also implemented the workaround for this issue which requires first accessing each site the user has access to by making some arbitrary call using the REST service. Then any subsequent calls using Graph should work. I do this for external accounts with a mail identity before trying to make the joinedTeams call but still run into the 400 response.
These workarounds will suffice in the short term but they increase my execution time significantly, especially when there is a large number of teams the external user is apart of. Any insight on a solution is greatly appreciated.
/me/joinedTeams is not available for personal Microsoft accounts. Se the table on this page

Can't get account_id from Google My Business API

I'm currently trying to use Google My Business API to get reviews for each location of my company. The problem is that i want to use the reviews methods but I can't use them without my account_id. To have it i know i can do the following request:
https://mybusinessaccountmanagement.googleapis.com/v1/accounts
The problem is that when I try to execute it, I have a 429 error saying that the quota of requests for the mybusinessaccountmanagement is exceeded. When I go to the My Business Account Manager page on my Google Cloud Platform Console, i can see that the Quota for this API is setted at 0 and I can't modify it because they ask for my account to have a facturation account.
Do you have any idea of how can I get my account_id to make my request with the Google My Business API?
Thank you
The Google My Business API is restricted by default because of its ability to access sensitive information and so requires approval before you are allowed to use it.
https://developers.google.com/my-business/content/prereqs#request-access
The prerequisites page calls this out and provides a link to the form to submit your application to gain access. Until you are approved through that process, your API quota will stay at 0.

Microsoft Graph API DeltaLinks for Shared Mailboxes Never Return Changes

I have a Office 365 Business Essentials Exchange Online Shared Mailbox I need to retrieve changes for on a scheduled basis. Access to this mailbox is granted to an AzureAD registered app via the Microsoft Graph API Mail.ReadWrite application permission. Admin consent has been acquired. Mailbox access is limited to just this one mailbox through an ApplicationAccessPolicy.
As this is a simple test case on a brand new mailbox that only contains a handful of test emails, I didn't use any filters or search terms. The initial request is in the format: https://graph.microsoft.com/v1.0/users/{ID}/mailFolders/{ID}/messages/delta?$select=sender,receivedDateTime,subject,body
I have no issues retrieving an access_token. The initial request and subsequent nextLink requests return results without issue as well. However, making a request against the deltaLink always returns an empty dataset. This occurs regardless of any changes made to messages in the folder since the deltaLink was retrieved. Instead I get the following response:
{
"#odata.context": "https://graph.microsoft.com/v1.0/$metadata#Collection(message)",
"#odata.deltaLink": "https://graph.microsoft.com/v1.0/users/{id}/mailFolders/{id}/messages/delta?$deltatoken=GoHFWffpmGHQHQdBstC3TW7TDQ4HvoU5hdqPXQ_DvM724L0CdVdFzRNBLVaICnIxrI9zMjxaHP7k0ncrSZj9L48EjNP7Hveu8IgKvkNUCGoRun6G89JzwGgNqn93Z4L5vtS8Fup2E6W6VD4LKMWehk5I6xWxPJMy8WwKsSrm8AJA0phlbIrqciV6G3MiQ67Q.xJrwL7OVVHnlcdTlcdctrLBRzRHLUZnpFCxbZL7MrCg",
"value": []
}
This behavior occurs whether I run the query from the registered application or via my own account using the Microsoft Graph Explorer.
Am I missing a step somewhere along the way or is this a bug? If the latter does anyone know of a workaround?

YouTube Data API v3 Queries Per Day quota issue

For years we have used the YouTube search API to provide a simple YouTube fallback for smart-tvs with no native YouTube app available. The Queries Per Day for our registered app has been set to "unlimited" trough all this time AFAIK, and we only use the youtube.search-list API.
Suddenly, three weeks back, access to the search function was no longer working. Turns out the quota for daily queries was set to blank(no number, no nothing). When trying to change it we get "enter a number in the range 0 to ."
First of all we linked the app to a billing account to be able to adjust the quota. But it was still not working. Then we contacted YouTube and filled out a big form to increase the quota. We got reply from YouTube that the quota request was granted. But we are still not able to set/change the quota. I've tried replying to to quota mail, but I guess the mail is not monitored.
We see others have had similar issues, and the solution seems to have been to contact YouTube. But we have not found any way to contact them regarding YouTube data API support queries except here on stackoverflow(we do not have a paid support plan). So we're posting here hoping that anyone from YouTube can respond - or to get tips from users that have been in the same situation.
UPDATE:
We have now tried two things:
* Removing and adding back in YouTube data API v3 in the registered app. Did not help
* Activating YouTube data API v3 on another app we have registered - this gave us a daily quota of 10000(but we would definatly prefer not to have to change to another API key)
UPDATE 2:
Info we left out that might be relevant. We recently went trough a process with Google filling out the "YouTube API Services Form"(a google docs form). We went back and forth with the google team, replacing logos, adding ToS links, changing UI etc. until we got a:
"Thanks for your response to the Audit Form. We will conduct our audit based on the information you provided. We will notify you if additional information is needed or when we completed our review. Thank you for your cooperation."
After this we have heard nothing.
Today we can see that the quota is back to 10000... We did send a second request for quota raise and I also sent a mail to the Audit Form team. Not sure which one did the trick - have received no response. And that's probably the most annoying thing about this - the complete lack of feedback.
I experienced the same issue before in one of my projects and I can tell that your access to Youtube data api has been disabled.
TLDR;
I noticed this first because I got the error below when calling Youtube data API.
{ "error": { "errors": [ { "domain": "usageLimits", "reason": "accessNotConfigured", "message": "Access Not Configured. YouTube Data API has not been used in project <my_project_id> before or it is disabled. Enable it by visiting https://console.developers.google.com/apis/api/youtube.googleapis.com/overview?project=<my_project_id> then retry. If you enabled this API recently, wait a few minutes for the action to propagate to our systems and retry.", "extendedHelp": "https://console.developers.google.com/apis/api/youtube.googleapis.com/overview?project=<my_project_id>" } ]
So I went to the console and checked if the API is enabled (And it was). Then I checked the quota, which I suspect is the issue because I got a blank value in the queries per day. I could still edit the value, but those values didn't take effect. It eventually transitioned to 0 and after that, I can no longer edit it (This is after some editing and refresh).
When I looked at my email, it shows that they sent me an email with the following subject and content.
Subject: [FYI] YouTube disabled your inactive project’s access to YouTube Data API Service
Dear YouTube API Developer,
According to our records, your project has been inactive for the past 90 consecutive days. In accordance with the YouTube API Services Developer Policies (link), we disabled your project’s access to and use of the YouTube Data API Service.
This will not affect other Google API Services that you may have enabled on this project.
For reference, your inactive project number is my_project_number
If you desire to access and use YouTube Data API Service, or believe you were disabled in error, you may complete and submit this form to get in touch with us.
Thanks,
YouTube API Services team
The form was included in the email, but since you haven't received one, here's what you need to do as stated here.
If the API is indeed enabled, then this means that your project’s access to YouTube Data API Service has been disabled.
You should’ve received a notice via email regarding this action, which also contains the steps that need to be taken to regain the project’s access. But just in case you missed it, please fill out and submit the exceptions form below:
https://support.google.com/youtube/contact/yt_api_form?hl=en
The alternative, outright solution is to create a new project where you will get the default 10,000 quota.

MS Graph API Teams: Application access to Channel Messages

I am looking at Teams Channel Create Chat Message method (currently only available in beta).
We have an application which manages groups of users and would like to integrate with MS Teams - create a Team, add Channels and send messages to the channel - all without a user. For this I have followed "Get access without a user".
However I notice that for this and other message level functions (list messages) Application permission is "Not Supported" and for our use case Delegated permissions is not really an option (similar to this).
Does anyone know why these are only available for Delegated Permission? is there a plan to enable this or is will this always not be "Not supported" for Application Access?
I appreciate that giving an Application full access to all messages may be something that Admins would not be keen on, but being able to post and retrieve messages from channels the application has created seems (to me) to be reasonable (perhaps the permissions model isn't that fine grained yet).
This is possibly an overlap of Unable to “List channel messages” on Azure AD Graph API Beta - the OPs answer contains an unanswered similar question.
We aren't currently sharing road map externally of when these types of things are being updated.
What we do ask is that you request these on our UserVoice channel so that we can track the demand and prioritize accordingly. If you can go here and add this request I'd appreciate this and I'll let the PM who owns this know https://developer.microsoft.com/en-us/graph/support

Resources