Places Room List API returns cached data - microsoft-graph-api

I have removed 4 existing room lists using Remove-DistributionGroup cmdlet.
I have added 1 new room list using New-DistributionGroup cmdlet.
However when calling the API
https://graph.microsoft.com/beta/places/microsoft.graph.roomlist
(using cURL)
with Application Permissions to Places.ReadAll, the API returns the old roomlists and not the new one.
However when calling EWS via EWS Java SDK, the output is as expected i.e. it only shows the new roomlist.
The Office365 Web app also shows the old room lists in the Browse for more rooms option.
Is the places resource returning cached data? If so what is the refresh interval here?
Update (Feb'20) Issue is no longer happening. Changes to roomlists are reflected instantaneously

This can take up to 60 hrs to show up in the Places API and web app. We are working on making this instant and should have this ready by end of Jan 2020.

Related

MS Graph API: Note Page Results Not Up-To-Date

When I load pages via
https://graph.microsoft.com/v1.0/me/onenote/sections/{ID}/pages?$top=100&$orderby=createdDateTime%20desc
the results are not up-to-date, even though changes have been synced across other devices.
There should be 4 pages in the section. This is what is in the response:
two existing pages (two are missing)
several other pages that were previously deleted, but when I try to fetch the HTML contents, I get a 404. The pages were deleted via DELETE https://graph.microsoft.com/v1.0/me/onenote/pages/{ID} per the docs
Does it work via the OneNote API?
Per #codeye's suggestion (see comments), I'm trying to access the pages via the one note API. It seems unclear whether this is still possible:
The API is deprecated and scheduled to sunset November 2022.
The docs refer to registering the application in the Microsoft account Developer Center, which appears to be obsolete and points back to the Azure portal
Later in the same doc, they refer to permissions like office.onenote_update that no longer seem to exist i.e. I can't find them in the Azure Portal. I do see permissions with the same name from two places: Microsoft Graph and OneNote - perhaps the permissions have been renamed?
However, after adding One Note ->
Notes.ReadWrite, logging out and reauthenticating, I'm still getting HTTP errors on onenote.com URLs like:
401 from https://www.onenote.com/api/v1.0/me/notes/sections/{ID}/pages?$top=100&$orderby=createdDateTime%20desc (as #codeye suggested below, tried with and without query parameters)
401 from https://www.onenote.com/api/v1.0/notebooks (URL from the docs
404 from https://www.onenote.com/api/v1.0/me/notebooks (same URL as previous, but with me/ segment added

Outlook REST API Flagging Message losing start date

I'm building an Outlook Add-In and using the Outlook REST API 2.0. When updating a mail message to flag the message for follow-up, the update is accepted and in the Outlook Web client it briefly shows the start and due dates, but within a few seconds the start date goes away. When looking at the message through the API, the start date is completely removed, even though it was successfully added.
The API is PATCH Office.context.mailbox.restUrl + '/v2.0/me/messages/' + messageId ...
EDIT: I confirmed that this same behavior is exhibited in the Graph API as well.
As soon as the API is called, the UI on the message is updated:
Shortly after that (sometimes within a second, sometimes a little longer), the UI changes to:
And once the UI updates, if you query the API for the message and look at the Flag property, the StartDateTime object is completely gone.
Has anyone seen this or know why it might be happening?
Checked it on Graph with the following payload for PATCH-Message call and it seems to be working fine.
{"flag":{"dueDateTime":{"dateTime":"2020-08-20T00:00:00.0000000","timeZone":"Asia/Kolkata"},"flagStatus":"flagged","startDateTime":{"dateTime":"2020-08-14T00:00:00.0000000","timeZone":"Asia/Kolkata"}}}
I suspect that there is another application/outlook add-in that's removing this flag. Can you check once?

In AzureDevOps Server (on prem) how do I get the timestamp when I last looked at a Pull Request?

I'm using the Microsoft.VisualStudio.Services.Client library (added via NuGet) to connect to my on-prem Azure Dev Ops server and query various bits of information regarding pull requests. I'd like to make a little notification application that can alert me if someone has replied to a comment I made on a pull request. The trick is that I only want to see the notification if I haven't already looked at it.
I know that the system knows when I last looked at the pull request because it decorates pull requests with new content (comments, new code, etc.) with a little dot and when I open a pull request, it tells me that there are new comments since I visited last and tells me how long ago I looked at it.
How do I get access to the date that I opened the pull request in the web via the client libraries or REST? In other words, how would my app know that I have or haven't looked at new comments via the web page?
I did not find such an api that can retrieve the timestamp the last time you looked at the PR.
There is lastUpdatedDate you can use to track the comments that were checked. So as a workaround you can save the lastUpdatedDate to a file in your code, and compare this value everytime when you call api. Then you will get the latest updated comments.
However, PR comments notification can also be configured from azure devops. You can go to your user profile on the top right corner and select notifications to enable the notification for A comment is left on a pull request.
For more information about Azure devops notification, you can check this document.

Returning employeeId of a user through MS Graph API

I've been trying to return the employeeId of a user through the Microsoft Graph API but so far haven't had much luck.
I'm assuming this is probably because it doesn't exist in the metadata for the user in the Graph API so makes sense.
However, the property is populated in Azure AD. If I use the AZ command prompt to query the user I can see the property. Likewise, if I query the old Active Directory Graph API endpoint I can even see it there.
For example, querying
https://graph.windows.net/{tennant}/users/{upn}?api-version=1.6 directly I receive the employeeId as part of the response (using the ActiveDirectoryClient however seems to ignore this property and doesn't store it anywhere).
Is there any reason for this? Wouldn't it make sense to have it returned as an additional property? I've also looked into extensions, but as it's not an extension isn't returned there.
Any help would be appreciated. I can get the information I need by querying the old endpoint directly, but this seems like a complete backwards step and involves multiple queries to get the information I need - including having to use multiple end points (one of which I assume will be deprecated and removed soon).
EmployeeId is currently a beta feature and is only available in the beta endpoint of the Graph API.
So if you want to access the beta endpoint you just have to change the version to beta in your url. For example:
https://graph.microsoft.com/beta/me/
https://graph.microsoft.com/beta/users/{id|upn}/
https://graph.windows.net/{tennant}/users/{id|upn}?api-version=beta
For more information about the user-object in the beta endpoint see: https://developer.microsoft.com/en-us/graph/docs/api-reference/beta/resources/user

Can I use PubNub to update and delete messages without "Storage&Playback" feature?

I am trying to build a realtime CRUD app. I have a rails app integrated with angularJS. It uses postgresql database, and angular is connected to the backend via JSON api. I'm running PubNub commands from angular.
So far, I got the PubNub subscribe and publish working, and the published data gets saved on the postgresql backend. In other words, I got the "create" and "read" part done, and I have the "update" and "delete" to implement.
I've been searching on google and pubnub, but the only examples I got were either for a project with PubNub+BackBone.js or I had to discard my backend with postgresql+JSON api and use PubNub's Storage&Playback feature.
Is there anyway that I can implement update/edit and delete on my current setup?
PubNub doesn't currently support update and delete. History keeps a full record of all publishes and they get automatically deleted based on the storage policy (keep for 1 day, 3 days, 30 days, forever).
PubNub stores all messages per channel with the Storage & Playback feature add-on. Since it stores all messages in a time series, and doesn’t expose Updating and Deleting, you need a simple pattern to implement this functionality. You can find details of this implementation here.
So basically, you will need storage and playback, and use this Message Updates and Deletes pattern to implement update and delete. PubNub doesn't support the functions directly, but you can use these patterns to "mark" message id's as deleted.

Resources