Comments (5)
Hello @grumpykiwi, Thanks for sharing your use cases! Upon checking Graph API documentation, we have found an API support to retrieve all users presence status: https://docs.microsoft.com/en-us/graph/api/resources/presence?view=graph-rest-1.0
Here are some additional things that might be helpful:
- We provide an SDK package that lets you easily create and authenticate a Graph Client: https://github.com/OfficeDev/TeamsFx/tree/dev/packages/sdk#create-and-authenticate-a-microsoftgraphclient
- You might need to specify additional delegated permission (
Presence.Read.All
) in thepermission.json
file if you created the Teams App project with the Teams Toolkit.
Lastly, I'm interested in learning your experience of finding APIs you need for your project. We certainly want to improve API discoverability so any feedbacks are valuable to us!
from teams-toolkit.
I set my status in Teams to the attached.
When I retrieve my status via Graph Explorer or the Graph API with the GraphServiceClient (specifying Presence.Read.All as my required permission) I get this:
{ "@odata.context": "https://graph.microsoft.com/v1.0/$metadata#users('{{ID}}')/presence/$entity", "id": "{{ID}}", "availability": "Available", "activity": "Available" }
As you can see, my custom status of "working from home" is not shown. This is the fundamental issue.
As far as finding APIs. Mostly googling or digging thru the docs. I have not found them easy to find. Far too often there are only examples for pure Rest calls. It would make my life easier if there was also an example C# example using the Graph API and graph service client.
Using the select keyword to filter output on group queries is especially lacking in real examples for C#. It takes a lot of trial and error to get the syntax right.
The documentation itself tends to be a bit vague on required parameter types sometimes. Permission Scope usage varies widely. Space delimited, string array, comma separated?. Yet again an example would help
This for example:
https://docs.microsoft.com/en-us/javascript/api/@microsoft/teamsfx/teamsusercredential?view=msteams-client-js-latest
Not very helpful at all.
Anyway. Hope this helps, but I really could do with that custom status
Thanks
from teams-toolkit.
Thank you for sharing your scenario and feedback! As we are not Graph expert, you might get better answers/suggestions from Graph Support: https://developer.microsoft.com/en-us/graph/support
We also hear your pain points of API discoverability, from a tooling perspective we may think of a way to provide better support, so stay tuned!
from teams-toolkit.
Thanks. I added a comment over at the Graph support portal. Seems I am not the only one requesting this feature.
from teams-toolkit.
We will close this as it's reported to the Graph Support channel. Please feel free to reopen if there is any issue.
from teams-toolkit.
Related Issues (20)
- [Known Issue] Calling Azure Function will return ERR_CONNECTION_REFUSED. SSO projects with OBO flow can't popup login page. HOT 1
- Teams Toolkit => Prepare Teams App Dependencies throws "The operation has timed out." SystemError HOT 8
- bug report: custom-copilot-rag-custom-api.failed-to-update-custom-api-template HOT 2
- commandMiddleware converting all inputs to lowerCase, breaking some command scenarios HOT 3
- Possible "This app cannot be found" error when debugging a new Teams app HOT 1
- Cannot create new Teams apps with Teams Toolkit in Visual Studio Community 17.10.2 HOT 7
- Implementation of Translation in Teams Bot adaptive cards HOT 9
- The wrong dev tunnel is being selected HOT 4
- There was a problem reaching this app HOT 2
- Code Error HOT 2
- Teams Toolkit VS 2022 - .gitignore missing in TeamsApp.ttkproj HOT 2
- Teams tab app error - CP.UiRequiredError: Failed to get access token cache silently, please login first: you need login first before get access token. HOT 2
- Add skip update parameter to publishAppPackage if app exist HOT 1
- [Known Issue] VS local debug to open the Teams browser will use edge profile account instead of the project's m365 account HOT 1
- Teams app updates does not reflect quickly HOT 4
- (×) Error: teamsApp/extendToM365 failed. (×) Error: Request failed with status code 406 (tracingId: ) NotAcceptable: Error with the data stored in cache. This is most likely due to an error with the package being uploaded HOT 2
- Unable to create the bot through `teamsapp provision` HOT 3
- teamsApp/extendToM365 error with NotImplementedError HOT 4
- Reload caché in Microsoft Teams Tab HOT 3
- What is the purpose of creating an AAD application? HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from teams-toolkit.