MS Graph API not giving response in SPFX Page, if I add ?env=WebView in Query string - microsoft-graph-api

My MS Graph API is not giving the response nowadays if I pass ?env=WebView as a query string in my intranet page which is developed with SPFX. It is working fine without giving me any problem for the last year. For the last 3 to 4 weeks this problem has started.
If I remove the query string and run the page, then it gives me the response from Graph, but along with the query string, it is not giving me the response.
Am using this graph to get my Outlook Calendar Events, Unread Mail count, and Recent Files from Drive.
Kindly help me to solve this issue.
Thanks in Advance.

Related

MS Graph beta API onlineMeetings attendanceReports not working

I'm trying to get the recent changes to the MS Graph beta API to return a collection of meetingAttendanceReports using /attendanceReports (see https://learn.microsoft.com/en-us/graph/api/meetingattendancereport-list?view=graph-rest-beta). I have tried this in Graph Explorer and also in a C# console app in VS, but cannot get it working.
The (Graph Explorer) request is as follows:
https://graph.microsoft.com/beta/users/8b16954b-5dcb-4395-89bb-be879c0f8f77/onlineMeetings/MSo4YjE2OTU0Yi01ZGJiLTQzOTUtODliYi1iZTg3OWMwZjhmNzcqMCoqMTe6bWVldGluZ19Zek0yTnpVNU5ERXRNRFUwT1MwME5UZzRMVGszTXpZdE16QmxNV1JqTmpCak5tRXhAdGhyZWFkLnYy/attendanceReports
The response I am getting is "BadRequest" : "Value cannot be null.Parameter name: String".
The online (Teams) meeting is successfully returned if I remove /attendanceReports resulting in the following request:
https://graph.microsoft.com/beta/users/8b16954b-5dcb-4395-89bb-be879c0f8f77/onlineMeetings/MSo4YjE2OTU0Yi01ZGJiLTQzOTUtODliYi1iZTg3OWMwZjhmNzcqMCoqMTe6bWVldGluZ19Zek0yTnpVNU5ERXRNRFUwT1MwME5UZzRMVGszTXpZdE16QmxNV1JqTmpCak5tRXhAdGhyZWFkLnYy
I have spent days trying to get this working. Although similar error responses can be found by searching online, none of them seem to relate to this particular situation. Any help would be gratefully appreciated.
Created an onlineMeeting using Graph API and got the meeting ID from the response
Then by following this doc tried to get attendanceReports and got proper response.

Graph API query for a Teams Channel by DisplayName returns no results

We are trying to query for the ID of a Teams channel based on its name.
Step one is GET https://graph.microsoft.com/v1.0/teams?$select=id,displayName&$filter=DisplayName%20eq%20'{name}'. This works just fine and returns the expected Team ID.
Step two is GET https://graph.microsoft.com/v1.0/teams/{teamId}/channels?$select=id,displayName&$filter=DisplayName%20eq%20'{name}'.
Up until about 2 weeks ago, this query also worked as expected. Now, we get no results. Not an error, not a 404, just an empty result set. This is happening with both the .NET and JavaScript SDK. The channels have existed for a long time and have not been changed recently. I am using a token with app-level permissions for Group.ReadWrite.All and Team.ReadBasic.All.
The problem is not with your query or with permissions. It's bug in Graph API for channels when $select is added.
Issue 1
Issue 2

Count of user/members from group azure AD using graph API

I need to take a count of each group from Azure AD using Graph API. Can anyone tell me how to achieve it
I also faced the similar issue. When I ran the end point mentioned in https://learn.microsoft.com/en-us/graph/api/group-list-members?view=graph-rest-1.0&tabs=http#example-2-get-only-a-count-of-all-membership I got "$count is not currently supported."
However, if you notice the documentation clearly, it asks us to send in the ConsistencyLevel as eventual in the REST header. I got the correct response when I sent the header along with the call:
GET https://graph.microsoft.com/v1.0/groups/{id}/members/$count ConsistencyLevel: eventual
There is currently no Microsoft Graph endpoint to get the number of users.
You could list members by using:
GET https://graph.microsoft.com/v1.0/groups/{id}/members
And then handle the count of the members in your code.
See the reference here. Try it quickly with Microsoft Graph Explorer.

Google Fit API - retrieving of fitness datasets

I am working on a web application which retrieves fitness data from the Google Fit REST API.
Everything worked fine until a few weeks ago. Now, Google Fit responds with a empty response body. So, the response contains absolute nothing. Google Fit returns a status code 200. I have changed nothing in my code which could have affected this.
I use this HTTP GET URL to request steps data:
https://www.googleapis.com/fitness/v1/users/me/dataSources/derived:com.google.step_count.delta:com.google.android.gms:merge_step_deltas/datasets/1443869895588000000-1446465495589000000
When I use this URL to request fitness data in the OAuth Playground everything works fine.
I would be very thankful if someone has an idea how to fix this! :)
I did not use Rest api But I Used History API and Session API. Google respond error most of the time when the time interval you gave is wrong, or the data-type you are requesting are mismatched. Try checking it one more time which are the parameters you are sending in post.

Twitter Api giving only tweets of Last Couple of days

Recently I implemented OAuth in our Ruby on Rails application with OAuth gem and started using it.
Technology :- Ruby On Rails
Before Implementing OAuth, I use to call the below URL it use to give the tweets properly,
http://search.twitter.com/search.json?q=moxie&count=100
But, After Implementing Oauth, I am calling the Below URL :-
https://api.twitter.com/1.1/search/tweets.json?q=moxie&count=100
Which is not giving the Tweets properly, i.e the result set is containing only Tweets of last couple of Days.
How to retrieve tweets from last two months or more than that?
Thanks in advance
check your api request limit, o try to split your request, by 50 tweats

Resources