How to get conversationTopic in Graph API? - microsoft-graph-api

Earlier we were using Exchange Service to read outlook mails. And we were able to get conversation topic. But now in Graph API we are only getting conversationId and conversationIndex.
Is ther any way to get conversavtionTopic in graph api.
Example:
subject: [EXTERNAL] Test-1
conversationTopic: Test-1
subject: [EXTERNAL] RE: Test-1
conversationTopic: Test-1
ConversationTopic
Contains a normalized form of the subject value that was set on the original message. This is the same as the Thread-Topic message header. This value is read-only.
I tried to use conversationId to search if I can find conversation topic but could't find anything.
https://graph.microsoft.com/v1.0/me/messages?$filter= conversationId eq 'yourConversationId'

The Graph doesn't provide that as a strongly typed property but you can query the PR_CONVERSATION_TOPIC property using the ExtendedProperty definition eg
https://graph.microsoft.com/v1.0/me/messages?$expand=singleValueExtendedProperties($filter=id eq 'string 0x0070')

Related

get In-Reply-To value from InternetMessageHeader in outlook graph api

I'm trying to use the MS graph API to get the In-Reply-To message header without having to return the entire header (internetMessageHeaders). I already get several properties (such as bccRecipients, from, id) which are documented here
I've seen several SO questions asking this and they point to using SingleValueExtendedProperties/internetMessageHeaders with a $filter clause. I've tried this and it appears to only work with properties which are documented
This is what I've tried all give a 404 error (i've checked the the In-Reply-To header is present on the actual message)
https://graph.microsoft.com/v1.0/me/messages/MSG_ID?
$select=Subject,internetMessageId,from,id,bccRecipients,
SingleValueExtendedProperties&$expand=SingleValueExtendedProperties($filter=In-Reply-To eq 'String 0x007D')
https://graph.microsoft.com/v1.0/me/messages/MSG_ID?
$select=Subject,internetMessageId,from,id,bccRecipients,
internetMessageHeaders&$expand=SingleValueExtendedProperties($filter=In-Reply-To eq 'String 0x007D')
https://graph.microsoft.com/v1.0/me/messages/MSG_ID?
$select=Subject,internetMessageId,from,id,bccRecipients,
internetMessageHeaders&$expand=internetMessageHeaders($filter=In-Reply-To eq 'String 0x007D')
You need to request PR_IN_REPLY_TO_ID MAPI property (0x1042001F)
$expand=singleValueExtendedProperties($filter=id eq 'String 0x1042')

Using OR in filters for Office 365 Service Communications API or filtering by multiple IDs

How can I filter by multiple IDs using the Office 365 Service Communications API?
I'm getting the current status using https://manage.office.com/api/v1.0/{tenent}/ServiceComms/CurrentStatus which gives me incident IDs. I'm trying to use those IDs to get the messages affiliated but the message endpoint /ServiceComms/Messages is not working well with the filters.
The documentation shows:
I've tried:
/ServiceComms/Messages?ID=CR555555,/ServiceComms/Messages?ID='CR555555', /ServiceComms/Messages?Id=CR555555,/ServiceComms/Messages?Id='CR555555' - Returns everything (doesn't filter)
/ServiceComms/Messages?$filter=ID eq 'CR555555' - Returns Error
/ServiceComms/Messages?$filter=Id eq 'CR555555' - Returns 1 result
/ServiceComms/Messages?$filter=Id eq 'CR555555' or Id eq 'CR555556' - Returns error
I was able to get an AND result using
$filter=MessageType eq Microsoft.Office365ServiceComms.ExposedContracts.MessageType'Incident' and EndTime ge 2019-07-25T00:00:00Z but OR always errors with the message "Filter {filter} is invalid. Expected '<Item> <operator> <Value>' pattern."
You need to use Microsoft.Office365ServiceComms.ExposedContracts.MessageType'Incident' as your MessageType.
A request to /Messages should return you a odata context at the top of the response. For example:
{
"#odata.context": "https://office365servicecomms-prod.cloudapp.net/api/v1.0/{{TenantID}}/$metadata#Messages",
...
}
If you query that, you receive the metadata along with the possible filters. I cannot give you an example as of today (2020-02-16) a query returns a 500 Internal Server Error. Microsoft is working on a fix. Maybe it works again by the time you read my reply.
Complete example:
https://manage.office.com/api/v1.0/{{TenantID}}/ServiceComms/Messages?$filter=MessageType eq Microsoft.Office365ServiceComms.ExposedContracts.MessageType'Incident' and LastUpdatedTime ge 2020-02-13T00:00:00.000Z
And yes, the ID filter must be written 'Id'. Microsofts documentation has a lot of wrong information in it.

Is it possible to filter email using EntryID (PR_ENTRYID) with Outlook REST API?

We are currently using EWS Managed APIs in our application and looking to migrate to use Outlook REST API approach. I am new to Outlook REST API world and looking for some inputs.
I am trying to fetch email from exchange using PR_ENTRYID with REST API and retrieve its properties, however always facing error like below:
Response status code does not indicate success: 400 (Bad Request).
Endpoint used :
https://outlook.office365.com/api/v2.0/me/messages?
Code:
Above endpoint is appended with below filter:
"$filter=SingleValueExtendedProperties/any(ep: ep/PropertyId eq 'Binary 0x0fff' and cast (ep/Value, Edm.Binary) eq '" + entryId + "')";
where entryId is
"00000000224A6557586868FH8N6765SZ6F78768686C9786R7658E8686860886D8768676C8B6CV75V7C57S6F5S8FSF7S9F7D86GD7G57D6G86D84000000"
also tried entryId of below form with no luck:
"AAAAACJKsh5bmbBdknCdkkjAAdjhV76ssn876fBDJg76jdkBfnnnkbslnKns76229873qHGHGnPPSHSFH+gdgf8BmF8aJdgaAAA=="
Please note that I am able to expand properties as mentioned here, however unable to filter/fetch email with that property. I have followed official documentation at official documentation
Any help is highly appreciated.
Thanks.

Is there still "no API to manage consumer googlegroups.com groups programatically"?

In an answer to this 2014 post
Unable to retrieve members of a google group, getting Invalid Input
you read: "There is no API to manage consumer googlegroups.com groups programatically".
Is this still the situation in 2018?
I tried to follow the suggestion in answer 3 of the post How to get the list of members in a Google group in Google app script (Admin SDK)? but I get the following error message:
ReferenceError: "AdminDirectory" is not defined. (line 9, file "Code")
where line 9 (and following) is (are):
page = AdminDirectory.Members.list(groupKey,
{
domainName: 'googlegroups.#com',
maxResults: 500,
pageToken: pageToken,
});
Searching to understand the error I found the reference page for Members: list. Using the "Try this API" form in that page I get the error reported in the first post I mentioned.
If it is NOT true that "There is no API to manage consumer googlegroups.com groups programatically", is there a guide to copy the list of the members of a group I own in a google-sheet sheet? (I mean to copy via a function, non by hand exporting and reimporting the CSV)
Many thanks, Roberto Scotti
It's 2021 and I still can't find any evidence there's an API for #googlegroups.com groups, sadly.

How to set Vendor Tax ID and 1099 Eligibility in API?

I'm currently using Consolibyte's PHP QB classes to interface with the QB api.
I've been successfully creating and updating Vendor's in QB for a while. However, we have a new requirement to use the API to store vendor's tax information.
I've tried to lookup the correct syntax to set these, but have been unsuccessful thus far.
My most recent attempt was:
$Vendor->setVendorTaxIdent($provider->taxId);
$Vendor->setIsVendorEligibleFor1099(true);
The rest of the information set gets updated properly, and the return from
$result = $VendorService->update($this->context, $this->realm, $provider->vendorId, $Vendor);
seems to indicate success.
Please let me know if you need anymore context. Thanks!
Have you referred to the documentation?
https://developer.intuit.com/docs/api/accounting/Vendor
The documentation indicates:
TaxIdentifier: String, max 20 characters
Vendor1099: Boolean
The geters and seters exactly mirror the documented fields. So unsurprisingly, you'll have these methods:
$Vendor->setTaxIdentifier($string);
$string = $Vendor->getTaxIdentifier();
And:
$Vendor->setVendor1099($boolean);
$boolean = $Vendor->getVendor1099();
If you continue to have trouble, make sure you post the XML request you're sending to QuickBooks. You can get this by doing:
print($VendorService->lastRequest());
print($VendorService->lastResponse());

Resources