I've been looking into using the Graph API from Microsoft to monitor a few online Exchange inboxes.
I was reading their documentation here for Outlook Messages but I'm looking for conversationTopic. I know this is exposed in the normal Outlook Object Model; but I don't see it exposed in their documentation.
Has MS exposed this property in their API?
Info as of 9/15/2016
The conversationThread property has only been exposed in group conversations. It hasn't been exposed in a first class manner for a user's messages. This has been exposed on the beta endpoint via extended properties . You'll want to use the PidTagConversationTopic property.
Here's an example call to get this property (you'll just need to add your message id):
https://graph.microsoft.com/beta/me/messages('YOURMESSAGEID')?$expand=singleValueExtendedProperties($filter=id%20eq%20'String%200x0070')
Here it is for easier reading (no URL encoding):
https://graph.microsoft.com/beta/me/messages('YOURMESSAGEID')?$expand=singleValueExtendedProperties($filter=id eq 'String 0x0070')
Related
I have a service that manages all of the indexes/indxers I use for Azure Cognitive Search, and within that I am attempting to set disableOrderByHighWaterMarkColumn to true when creating/updating an indexer.
While I do see examples in the official docs for an HTTP request to set that field, I'm not seeing any parameter anywhere (including the Parameters option under the SearchIndexer object) that can be set to update that value.
Does nadisableOrderByHighWaterMarkColumn` through the C# API? I have the latest Azure.Search.Documents package installed.
You would need to add it as a custom key under the SearchIndexer.Parameters.IndexingParametersConfiguration property.
If for some reason that doesn't work as expected, then it is a bug with the .NET SDK that I would suggest you submit as an issue against the official Github repository.
To disable a Dynamics CRM 2016 user with C# code the SetStateRequest is currently used.
Example:
var requestToDisableUser = new SetStateRequest()
{
EntityMoniker = new EntityReference("systemuser", userGuid),
State = new OptionSetValue(1),
Status = new OptionSetValue(-1)
};
organizationService.Execute(requestToDisableUser);
However, according to Microsoft the SetStateRequest is deprecated and should be replaced by using Update
But when I try to use Update to disable a user
Example:
var userToDisable = new Entity("systemuser", userGuid)
{
["statecode"] = new OptionSetValue(1),
["statuscode"] = new OptionSetValue(-1)
};
service.Update(userToDisable);
Then it raises the error :
Unhandled Exception:
System.ServiceModel.FaultException`1[Microsoft.Xrm.Sdk.OrganizationServiceFault]:
'systemuser' entity doesn't contain attribute with Name =
'statecode'.
Which is true, because the systemuser Entity doesn't have a statecode.
And the systemuser Entity has a IsDisabled attribute, but that one is read-only.
So how can a user then be disabled/enabled without using SetStateRequest?
I don’t think it is possible, unless someone proves it is. To support my opinion: the latest SDK (8.2.1.1; 4/6/2017) still gives an example with SetStateRequest in SDK\SampleCode\CS\BusinessDataModel\UsersAndRoles\DisableOREnableUser.cs. Therefore, it should be the recommend way to do it, regardless the fact it is marked as deprecated in another part of documentation.
You might start an incident with MS support, or give suggestion on Connect; but according my experience, they don’t care much if workaround is available.
After CRM online 2015 update 1, special messages were deprecated for special attributes. Read more.
Per metadata, IsDisabled attribute of systemuser may be showing as not valid for update. And few other business owned entities like Team, BU, etc won't use statecode & statuscode.
You should be using IsDisabled attribute if planning to not to use deprecated methods.
It's probably a missing piece in documentation. But hints can be found wrt Specialized operations using Update message like below per MSDN
These specialized messages will continue to work with the 2011 endpoint. However, the recommendation is to use the UpdateRequest or Update method when possible to set these attributes. The Update message simplifies the Organization Service and makes it easier to code standard data integration tools used with Dynamics 365. In addition, it is easier to code and register a plug-in to execute for a single Update message instead of multiple specialized messages. The AttributeMetadata.IsValidForUpdate property for the above listed attributes has been changed to true in this release to enable this capability.
You can continue to use these specialized messages of the 2011 endpoint in your code. However, the Web API that eventually replaces the Organization Service supports only the Update message for these types of operations. If you want to get a head start on changing your code to align with the Web API, you can now do so. See Use the Microsoft Dynamics 365 Web API for more information.
I've created a sample App with Cordova and a Mvc5 application that talks with Azure Notification Hubs.
Registrations are handled by the backend because tags must be secured.
We have used three different templates registered from the backend for the iOS,WP8 and Android platforms; the backend can send a push notification with a $message payload using sendtemplatenotificationasync.
It's working but we have not used the templateName.
Reading the Registration from your app Backend documentation , I've found this:
"You can identify the templates by using the TemplateName property of
the registration".
Once I have successfully created a Registration with a templateName what can I do with it?
I expected to find an API Send method to be able to specify, besides the tags or tag expression, a specific templateName; I have not found anything like this.
What's the meaning and the general use case of templateName?
The template name is just a descriptive label for the template registration. It is not intended to be used to programmatically identify registrations and therefore there aren't any API methods that use the template name. You shouldn't use it for anything other than debugging or logging. (I don't set template names at all...)
You can check the official ANH Java SDK on GitHub for example: If you search for "templatename", you won't find any usage other than setting the template name for a registration.
All your templates should use the same template parameters, if they are intended for the same notification type. Then you just send a template notification with all the parameters to all platforms at once. That is the use case for template registrations. As far as I know, you can have additional parameters for specific platforms, registrations that don't specify a parameter, just won't receive it. Just make sure you send all parameters that are defined in all templates.
If you wan't to distinguish between registrations with different templates, use tags, e.g. for distinguishing platforms use tags like "Platform:Android", "Platform:iOS", etc. Or for distinguishing templates with different parameters use "Template:PersonalMessage", "Template:GroupMessage", "Template:BroadCast", etc...
Let's say you have iOS and Android clients. For iOS you would register with template that is compatible with iOS, and for Android you would register with template compatible for Android. Then, when you send your message, it will be formatted accordingly.
We did it even little bit differently compared to Microsoft example. Our clients (iOS or Android) provide template, so backend developers don't need to know those details. More here: http://discoveringdotnet.alexeyev.org/2014/07/registration-for-azure-notification-hub.html
I am writing a custom piece of code that dynamically creates modified document libraries. I've attempted to create a document library template, which succeeds in the UI but cannot be found via-webservices.
So to get to the point - I am attempting to:
1. Set "Allow Management Of Content Types" on the list.
2. Add a new Content Type (Already Created) to the list.
3. Set the new content type as the default content type.
4. Remove the "Document" content type from the list.
So far I have succeeded in being able to "Apply" the custom content type but the others are evading my grasp. The methods I have attempted are through the Lists.asmx service and the method described here: http://msdn.microsoft.com/en-us/library/websvclists.lists.updatelist.aspx
I tried setting the Flags property and a few other potential candidates with no success and no error messages complaining about what I was trying to attempt.
One limitation is that I do NOT have access to the sharepoint dll where this is living.
Once completed - this would be a plugin living in another non-sharepoint system. The only option to include the SharePoint client dll's would be to perform an ILMerge.
EDIT:
http://msdn.microsoft.com/en-us/library/sharepoint/jj193051.aspx (SharePoint 2013 Web Services)
http://msdn.microsoft.com/en-us/library/ee705814(v=office.16).aspx (SharePoint 2010 Web Services)
and yes - technically the ASMX services sound like they're on their way out: http://msdn.microsoft.com/en-us/library/sharepoint/jj164060.aspx
Edit: Tags are relevant to the question.
use SharePoint Client Object Model. This is a library that wraps calls to webservices that allows among other things to batch commands.
The operations you mention are all available.
here is a link to an article that explains Client Object Model:
http://www.codeproject.com/Articles/399156/SharePoint-2010-Client-Object-Model-Introduction
The article focus on ListItems but you can also interact with list properties, even web properties if you want.
Please note that you don't need to run Client Object Model from your sharepoint server. Note the "Client" part in the name.
My app adds some custom metadata to files. I want to display it in Windows Explorer like this:
or this:
Is there a way to do this in .NET?
There are two approaches to building custom columns in Windows File Manager: using Windows Property System and Property Definitions for Cloud Storage Provider. You will typically use the first approach to create custom properties for file types that you own. You will use the second approach when displaying custom data from your document management system or any other storage.
Using a Windows Property System.
You can create custom properties for specific file types in Windows Vista and later versions. These properties can be read-only or read-write. As well as they can be indexed by Window Search indexer and participate in the search. There are some limitations:
Microsoft clearly says that property handlers must be in C++, it can not be in .NET:
...property handlers cannot be implemented in managed code and should be
implemented in C++.
The property is tied to the specific file type, which typically belongs to your application. You can not create a property for all file types.
Using Cloud Storage Provider Property Definitions
In Windows 10 Creators Update and later you can add custom columns for file systems created using Cloud Sync Engine API (Storage Provider, Cloud Filter API). This API is used in such tools as OneDrive. You will need to register a Cloud Storage Provider sync root with custom properties definitions, provide data for your custom columns and finally implement a Cloud Storage provider using Cloud File/Cloud Filter API.
Property definitions are not tied to a file type and can be added for all files. Also, even though only some API is available in .NET you still can call Win32 functions and build a cloud provider using managed code only.
Registering the Cloud Storage provider. Here is an example of the Storage Provider registration with custom columns in C#:
StorageProviderSyncRootInfo storageInfo = new StorageProviderSyncRootInfo();
storageInfo.Path = await StorageFolder.GetFolderFromPathAsync("C:\\Users\\User1\\VFS\\");
...
// Adds columns to Windows File Manager.
// Show/hide columns in the "More..." context menu on the columns header.
var proDefinitions = storageInfo.StorageProviderItemPropertyDefinitions;
proDefinitions.Add(new StorageProviderItemPropertyDefinition { DisplayNameResource = "Lock Expires", Id = 2, });
proDefinitions.Add(new StorageProviderItemPropertyDefinition { DisplayNameResource = "Lock Scope", Id = 3, });
StorageProviderSyncRootManager.Register(storageInfo);
A complete registration example could be found here.
Providing data for property definitions. To provide the data for the columns you will use StorageProviderItemProperties.SetAsync() call:
IStorageItem storageItem = await Windows.Storage.StorageFile.GetFileFromPathAsync(path);
StorageProviderItemProperty propState = new StorageProviderItemProperty()
{
Id = 3,
Value = "Exclusive",
IconResource = "C:\\path\\icon.ico" // The optional icon to be displayed in the Status column.
};
await StorageProviderItemProperties.SetAsync(storageItem, new StorageProviderItemProperty[] { propState });
Another approach would be implementing IStorageProviderItemPropertySource interface. It returns properties based on your file path.
Cloud Storage Provider implementation. Finally, you will need a complete file system implementation, supplying data for your files/folders placeholders. You can find complete examples in .NET/C# here:
This post is marked obsolete because the content is out of date. It is not currently accepting new interactions.
PLEASE PAY ATTENTION: THIS ANSWER IS FOR XP AND VISTA ONLY, IT IS OUTDATED
It can be done on XP using a Column Handler shell extension - see here:
http://www.codeproject.com/Articles/3747/Explorer-column-handler-shell-extension-in-C#
However IColumnHandler is not supported on Vista and up. Here you have to implement PropertyHandler. See Windows SDK \Samples\winui\Shell\AppShellIntegration\PropertyHandlers.
Each property is described by property schema XML file. This property schema must be registered with PSRegisterPropertySchema(). Property handler implements IInitializeWithXXX, IPropertyStore and optionally IPropertyStoreCapabilities. You have to register CLSID of your implementation for each file extension you want to handle.
Unfortunately, you cannot use AllFileSystemObject or * in registration.