I am using Graph API to extract all the incidents and advisories from Microsoft but I encounter some issues, and I will be very happy if you can help me.
I am using the GET Method using the URL
https://graph.microsoft.com/v1.0/admin/serviceAnnouncement/issues but in the output, I can see that not all incidents are present, and I can see that there is present pagination in the output https://graph.microsoft.com/v1.0/admin/serviceAnnouncement/issues?$skip=100, can you guys help me how I should filter this to extract all the incidents from the API?
You'll need to make multiple calls until the response provides no further link for you to retrieve further records.
https://learn.microsoft.com/en-us/graph/paging
As is described in the above documentation ...
You can retrieve the next page of results by sending the URL value of the #odata.nextLink property to Microsoft Graph.
As previously stated, once you have reached the last page, you will no longer have a nextLink value to retrieve the next page.
Related
I am trying to retrieve all users from AD using Microsoft Graph APIs.
https://graph.microsoft.com/v1.0/users
But this is returning only some top n rows from the whole users list.
I guess its using some pagination there. But didn't find how to specify page number or those details as a parameter within the query.
https://learn.microsoft.com/en-us/graph/api/user-list?view=graph-rest-1.0&tabs=http
Ms Graph cant show all users in the same page as it may cause threshold issues if the user count is too high.
you need to use paging to achieve this i.e., to get all the users you can achieve it with the help of #odata.nextLink please refer Ms Document for more details.
We have been using the Graph API to create meetings in PHP using the Model\Event::class. It's been fine for many months. As part of the event packet we include onlineMeeting => true.
This would return (as per the Graph API documentation) an onlineMeeting json section in the returned json response properties. This would include (as per the documentation here https://learn.microsoft.com/en-us/graph/api/resources/onlinemeetinginfo?view=graph-rest-1.0) various useful bits of information like the toll number and more importantly the conference id for the meeting.
In the last week something seems to have changed and this is not being returned in the response json. onlineMeetings now only includes joinUrl.
We're actually experiencing the exact same thing here, last Friday we had one meeting that did return the number and conference ID and the rest going through up to now do not. They only include the meetingURL.
I contacted support and they are submitting a ticket to the Exchange department who handles this API call. I will report back what I hear from them.
Final update: Microsoft has re-added those variables so things should be back to normal!
I'm having some issues using a custom connector to get what I want out of the Microsoft Graph. Essentially, what I am looking to do is take the Email Activity User Detail report and turn it into a Power BI report.
The URL for that report is as follows:
/v1.0/reports/getEmailActivityUserDetail(period='D7')
In order to create this custom connector, I have been using the MyGraph Connector Sample as I'm not very familiar with the use of Power Query, nor the Graph API.
I have created the connector and can connect to the API and everything, but rather than return me the data, all the query does it return me a byte array I can't seem to do anything with.
From looking at Fiddler traces, the actual data I want is being picked up along the way, but it looks like the Graph API uses a redirect URL to the download, which I'm not sure my Power Query code is handling. I think it may just be returning the redirect URL as a string rather than the actual data.
Further to this, my query has no code to handle the NextLink if it goes over the number of returned rows (I think 200?), so I imagine it will not return the full dataset once I do get it working. How is this best handled?
Unfortunately, I am very new to Power Query (this is my first encounter with it, in fact), so I'm not sure where to begin to make the necessary changes to get what I need.
Any assistance would be greatly appreciated.
The Microsoft Graph API - GET Reports in Graph Explorer and Power BI question touches on a similar issue, though that is through the Application interface itself, which seems to be unable to get the necessary authorization tokens by itself.
EDIT: I have managed to fix the issue thanks to the advice from Marc LaFleur.
The problem was indeed that I was trying to use the Odata.Feed as the source. Changing the line:
source = OData.Feed("https://graph.microsoft.com/v1.0/me/", null, [ ODataVersion = 4, MoreColumns = true ])
To:
source = Csv.Document(Web.Contents("https://graph.microsoft.com/v1.0/reports/getEmailActivityUserDetail(period='D7')"))
Fixed the issue and returned the correct values with no other changes.
Microsoft Graph's Reports are not traditional REST endpoints. Rather than returning OData/JSON, they return a temporary URL to a physical file in CSV format.
From the documentation:
If successful, this method returns a 302 Found response that redirects to a preauthenticated download URL for the report. That URL can be found in the Location header in the response.
From the example you linked too, it looks like it is expecting an OData.Feed source (source = OData.Feed). In this case, you're not getting an OData result but rather a URL to a CSV file. I believe you're looking for Csv.Document instead.
It seems that the YouTube API doesn't give updated results for mostPopular videos in my country since few days.
Example:
This request (https://www.googleapis.com/youtube/v3/videos?part=snippet,contentDetails&chart=mostpopular®ionCode=FR) doesn't give me the same videos results than the ones displayed directly on YouTube for the French most popular channel (https://www.youtube.com/channel/UCmzy72gDEpfXoFV9Xdtd0DQ). It seems that the results of this request is not updated since the 1th of february. Results was real time updated before this.
Does someone know if something is wrong with my API request, or if there are some issues with the YouTube API at this moment?
There is nothing wrong with your request. This is a known issue with the YouTube API reported here for Saudi Arabia (but also applicable to multiple regions), and another related issue here with regard to content from France.
Your best bet would be to follow up with the YouTube team on one of those defects, or potentially (and dangerously) scrape the YouTube site for the correct results.
Problem seems to be solved since 13th of february (maybe someone from Google have seen my post..)
YouTube Channels and chart=mostPopular parameter data are separate data entities, aka you will get different results. They may be related but there is no guarantee you will get the same data. To get the data that you want you may need to query for channel itself and its videos.
I got this information from the thread #Jal linked, there was an update by matthewc...#google.com a few days ago:
The most popular channel for Saudia
Arabia and
the mostPopular chart parameter in the video.list
call
are separate and distinct entities. If you'd like to get the content
of the most popular channel for Saudia
Arabia
please use the Data API video.list call to list the videos with the
channel ID (in this case "UCWY-_j1MCth6yf24m58Bh_Q") by setting the
items/snippet/channelId parameter.
My current concern right now is that there is supposedly a way to get video information from the videos.list endpoint using a channelId, which does not seem the case in the API Explorer. I will update my answer once I figure out what this person meant exactly.
I've been using the old url api(v1) to get the count of a given url, lately I needed to get also the re-tweets and started searching about that.
this is the exact url I'm using right now:
http://urls.api.twitter.com/1/urls/count.json?url=http://google.com
As I viewed with some reading the v1 api is deprecated but at least it's still working.
I found some questions on the dev page of twitter:
https://dev.twitter.com/discussions/12643
those are a little old questions and have no specific solving to the problem. I mean, the most near solution was using the search api(search/tweets) which could be good but not a exactly replacement for the urls/count method.
Please note that Twitter's search service and, by extension, the
Search API is not meant to be an exhaustive source of Tweets. Not all
Tweets will be indexed or made available via the search interface.
also it has a limit for 100 results at maximum per 'page', even it throws the link to get the next set of objects, thats good but when the search reaches 1 million of results I'll need to get page over page to now how much tweets I got and having to do to much request to the api...
I sought some question over the dev page on twitter suggested using the stream api, I've tried using (statuses/filter) but that don't work very well given a URL as track param(which they said that is the keyword to track).
So, anyone who's been using the old urls/count has found a reliable alternative with the new apiv1.1, especiffically to get the tweets and re-tweets for a given url ?
The official suggestion by Twitter staff is that either the search/tweets endpoint (having just the last 7 days data) or the Streaming API be used (handling yourself the counters, making everything just too complicated for a d*mn counter).
As an extra warning, the old endpoint (http://urls.api.twitter.com/1/urls/count.json?url=YOUR_URL) will stop working on November 20th, and according to this blog post from Twitter there are no plans to replace it with anything in the short term and they are even removing the count from their own buttons.