Closed NightMean closed 4 months ago
I'll take a look ReadWrite. I don't see me doing anything with Read.All, because you will need to input who's presence you want to read somehow, but I'll take a look.
Thank you! I assume that Read.All
it would require to input user email address at best or at the worst, their User ID. I know it would be pretty specific but I could also see a use case for other colleagues who might not be able to get their admin approval. It's way easier to send the status from my HomeAssistant to theirs rather than fighting with a security admin haha :)
Of course, the ReadWrite
would be the most useful.
Currently there is no support in the library I use to access O365. Previous experience is that it can take a long time to get features added to the library. This is the python code set that supports Teams elements - https://github.com/O365/python-o365/blob/master/O365/teams.py.
Ah, that's a pity.. Is there no other way to add it? I found this https://alexholmeset.blog/2022/01/09/set-presence-for-an-end-user-in-microsoft-teams/ which doesn't look that bad, only if it was a python code :)
I fully understand if you don't want to add something outside the library that you are using.
I'm not going to start using random other bits of code I'm afraid (certainly not PowerShell). I didn't say it wouldn't get done, I said it will likely take time (months). I have contributed to that library before, so I will consider if I do the same again.
Understood. Thanks for your effort.
I think it needs this:-
Not:-
https://learn.microsoft.com/en-us/graph/api/presence-setpresence?view=graph-rest-1.0&tabs=http
Set Presence requires a sessionId, which I guess is created by Teams or the like. No idea, and can't easily see. Anyway Set Preferred Presence seems to do the job when I tried it in Graph Explorer.
Hm interesting. The preferredpresence
does have the same options for status as Teams does in UI while the setpresence
shows activities that are set only by another apps. I think it would require combination from both of those 2.
When I'm in Webex call, I'd like to set the presence as InACall
instead of just Busy
. However I'm not sure if it would be possible to get the SessionID of currently running Teams easily.
Done some more reading, looks like I should use client_id (application_id) in the session_id field. I'll take a look at it some time next week.
I have submitted a PR for the library updates here - https://github.com/O365/python-o365/pull/1038 - I'll look to work on the integration when that has been merged and released (last release was in September).
Wow, cool! Thanks for the update.
Whilst the change has been released in the library, there are other changes in the library which have broken the integration. I have had some interaction with the library owner, but I'm awaiting resolution before I can progress.
This issue is stale because it has been open for 30 days with no activity.
I've added the ability to update user status, it will be in the next release. I need to think about the other part of this request, to monitor another users presence.
Perfect! Thanks a lot! I will test it once it's released :)
Beta just released - https://github.com/RogerSelwyn/O365-HomeAssistant/releases/tag/v4.7.0b1
I'll probably tag a few posts, but I'm trying to get some views. I'm considering breaking up the monolithic O365 integration into smaller, more manageable items. If you have a view, please comment here:
Hi, First of all, thanks for working on this integration!
With the reference to #19 I've noticed that Microsoft allows to write a presence status via
Presence.ReadWrite
as per their documentationHaving this, I could sync my Teams status with Webex and other stuff that I'm currently doing when I don't want to be bothered :) There is also
Presence.Read.All
which could be used to let me know once colleague is back at office for example. Would it be possible to add this feature ?