I am using MS Graph API for fetching the user's presences, now i am stuck at fetching multiple subscriptions. e.g. If i have 10 users in my teams tenant, i want to get subscriptions for their presences, so that when someone's presence changed i will get a subscription. The method i am using is working fine for single user. When i give single user id in resources, subscription works fine but for multiple users, am unable to use the filter clause which mentioned in many documents. Now now i need to add "/communications/presences?$filter=id in ({id},{id}…) (multiple users)" but am confused as it gives me invalid filter clause error if i add filter('') in it.
Facings issues in fetching Multiple users Subscription for Presence MS Graph API (For Microsoft Teams)
476 Views Asked by HAMZA At
2
There are 2 best solutions below
14
Sayali-MSFT
On
You check the filter documentation https://learn.microsoft.com/en-us/graph/query-parameters?context=graph%2Fapi%2Fbeta&view=graph-rest-beta#filter-parameter. You'll see that values actually need to have ' ' around them.
So if you change your request to the following it should work:
{
"changeType": "updated",
"notificationUrl": "https://c3b9ebcxxxxx.ngrok.io/presence-notify/",
"resource": "/communications/presences?$filter=id in ('a3c710b2-33f8-4e7c-85b9-cbd88cdbxxxx','eab3e87b-473d-4d2d-9587-b7156b7exxxx')",
"expirationDateTime": "2021-12-30T08:37:12Z",
"clientState": "secretClientState"
}
Related Questions in ANGULAR
- Firebase link existing user to anonymous account?
- It doesnt always show all the books on my homepage
- Google adsense ads.txt status cannot be not found
- When I navigate to the URL'http://localhost:4200/', it redirects me back
- Ionic Angular Standalone ion-icon are not showing at all
- How to make Angular understand that view child is of a specific type, not a general ElementRef?
- vscode, debug angular, first time, doesn't debug, 2nd time stops at main.js then it's ok
- How to perform CRUD operations on a static JSON array in Angular? (without API)
- Ngrx props<>() method in createAction()
- How to animate rotation of an image inside input control?
- Detecting click inside and outside of the listening component in Angular
- Angular - type guard not narrowing types
- In node_modules file i am getting Angular genric error while using fontawesome in angular12
- Angular 16 sending null values to API
- GoogleCloud Error: Not Found The requested URL was not found on this server
Related Questions in MICROSOFT-GRAPH-API
- Teams tab application returns SSO error in mobile Outlook
- Implementing Incremental consent when using both application and delegated permissions
- Issue uploading files in spring boot java to onedrive using API
- Validating Access Token in ASP.NET Core Web API project
- MS Graph API Error 504: Timeout when send large data (Java Sdk 5.80.0)
- Why does the API getTeamsTeamActivityDetail has missing data?
- .NET 8 DownstreamAPI not authenticating
- Inquiry Regarding Feasibility of Fetching User login hours(In numbers) Status from Teams for SPFx Integration
- MS Graph .net SDK cannot expand calendar event SingleValueExtendedProperties
- How to disable cached responses from node fetch? (Microsoft Bookings API)
- Build self service Microsoft Partner Center portal using Graph API ( web app )
- Adding skiptoken to query parameters for graph api v5 requests
- OneDrive download link to a direct link not working, auth requested
- Microsoft Teams, Graph API, send message to channel InsufficientPrivileges MessageWritesBlocked-Thread is not marked for import
- Microsoft graph api to get lists in a sharepoint site not listing all lists
Related Questions in MICROSOFT-TEAMS
- Teams tab application returns SSO error in mobile Outlook
- logiapp teams api connection terraform user sign in
- Unable to publish the MS Teams application using Teams CLI
- Teams Toolkit Bot - Storage Issues
- Microsoft Teams webhook send image
- Inquiry Regarding Feasibility of Fetching User login hours(In numbers) Status from Teams for SPFx Integration
- How to authenticate a Teams tab app built in Angular using Microsoft Entra
- Microsoft Teams, Graph API, send message to channel InsufficientPrivileges MessageWritesBlocked-Thread is not marked for import
- Add interruption button in Azure bot framework
- Trouble displaying content in tab Microsoft Teams. in our published app
- How to map the matched recordings and transcripts from onlineMeeting APIs?
- Working with MS Teams Webinars Graph REST API v1
- Odata filter DateTime casting string to DateTime and Filtering
- Single Tenant Teams Bot Authentication Error: Missing access_token
- How to schedule a MS Teams meeting programmatically?
Related Questions in MICROSOFT-GRAPH-TEAMS
- Conference ID of OnlineMeeting created via Microsoft Graph API expiring for phone dialing
- How do I programmatically create a video meeting on teams.microsoft.com?
- Graph API list joined Teams where isArchived =false
- Unable to get teams message attachment content using graph API
- Is there a way to post a message with a code snippet?
- GET Shift Preference Issue
- Crisis Communication MicrosoftGraphRequestFail Error
- Getting Primary Channel of Public Teams
- Is there any graph API to update the user's status inside msteams?
- Call & Meeting Bot Teams, Speech
- Microsoft Teams Application Authorization: ngrok gateway error The server returned an invalid or incomplete HTTP response
- Get Microsoft Teams Shift per User - shiftrequests (deprecated) alternative
- Microsoft Teams cloud calling/graph-is there a way to have a bot add a PSTN participant to a meeting?
- Teams listChannel Graph API resulting in "Unauthorized error - "Failed to execute Aad backend request GetUsersByObjectIdsRequest"
- MS Teams Call Queue - Wait time
Related Questions in USER-PRESENCE
- How can I stop codelenses from breaking up indent guides in VS Code?
- Migrosoft Teams mgraph REQUEST 401 SSL errror
- Connection disconnected Server returned an error on close: Connection closed with an error. ArgumentNullException Value cannot be null (Parameter key)
- Get Teams Call state
- Laravel 9 presence channels for all users (guests and logged)
- How can I get what a user is playing on discord?
- How to retrieve online presence status in Outlook using VBA
- Users Presence Monitoring Using Firebase Realtime DB Rest API
- Managing user presence in real time database using Flutter
- Facings issues in fetching Multiple users Subscription for Presence MS Graph API (For Microsoft Teams)
- onDisconnect fires when client reconnects
- Cloud Firestore for Presence notifications
- Firebase Realtime onDisconnect does not work when same app is running location service in the background(location.enableBackgroundMode(enable: true);)
- presence update not working discord.js v12
- How do I send Presence update after my phone goes back from sleep with PubNub?
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
public getMSTeamsSubscriptionForPresence(ids) { try { let obj = { "changeType": "Updated", "userid": this.configService.getCustomerID, "expirationDateTime": "2021-12-22T10:45:39.2257768+00:00", "resource": "/communications/presences?$filter=id in (" + ids + ")", "notificationUrl": this.configService.apiUrl + "/teams", } return this.graphClient.api("/Subscriptions").post(obj); // } } catch (err) { console.log('error while getting subscription ', err); } }
where ids format will be 'id1','id2' etc.