Enable Soap logs for Windows Live MA 2.0

At c: you find an xml file – SoapTraceConfig.xml – where you can enable the soap logs.

<?xml version=’1.0′?>
    <!–Possible Flag values: AllRequests, FailedRequests, SuccessfulRequests, NoRequests–>
    <!–Absolute path to store Soap Request/Response Xmls.  –>

You just have to replace the Flag value by AllRequests to get detailed log files

Windows Live MA 2.0 additionally attributes

Thanks to Shawn Lloyd from Microsoft support team for this information.

I tried to set some additionally attributes like country, timezone, …, but I was getting some errors in the export log file

<BeginExport time="12-11-2007 10:37:06">
<ExportEntry time = "12-11-2007 10:37:10" SigninName = "XXX@YYY.pt" ModType = "Add">
<error action="Exception" time="12-11-2007 10:37:14">
<![CDATA[[Exception] : <ErrorCode>0x80048112</ErrorCode>
<ErrorDescription>Multiple Errors Occurred</ErrorDescription>
    <ErrorDescription>No error description</ErrorDescription>
</MultipleErrors><p:userData xmlns:p="http://schemas.microsoft.com/Passport/User"><p:dataOwner>00037FFE8B02F0CF</p:dataOwner><p:propertyCollection name="Addresses_CS"><p:property name="Home.Country">PT</p:property></p:propertyCollection><p:propertyCollection name="Authorization_CS"><p:property name="MSNTOUVersion">-1</p:property><p:property name="F2_Hotmail">1</p:property></p:propertyCollection></p:userData>
[Stack trace] :    at Microsoft.Passport.MIIS_ExtensibleMA.PassportMA.HandleSoapException(String strExceptionSource, String strRelatedInfo, SoapException e)
   at Microsoft.Passport.MIIS_ExtensibleMA.PassportMA.CreateUserProfile(ProfilePropertyBag ProfBag, Boolean fF2Hotmail, Boolean& fProfDup)
   at Microsoft.Passport.MIIS_ExtensibleMA.PassportExtensibleMA.ExportEntry(ModificationType modType, String[] astrChangedAttributes, CSEntry csEntry)
[Source] :

<EndExport time="12-11-2007 10:37:14"/>

It seems that there are some attributes that are interdependent so here is the dependencies that I'm aware:

| Attribute | Required Attributes |
|Birthdate | Country | | |
|Country | Birthdate | | |
|TimeZone | CountryCode | RegionCode | |
|RegionCode | Country | | |

I tried to set the birthday (dd:mm:yyyy) (yes! colons instead of hyphens) and the country and it worked!

Windows Live ID and MIIS Service Account

To the management agent work correctly with Windows Live the MIIS Service Account must be a member of the local administrators group.

If you don't follow this rule you get a stop-extension-dll-exception and in the event log you get:

"System.NullReferenceException: Object.reference not set to an instance of an object"
Microsoft.Passport.MIIS_ExtensibleMA.PassportExtensibleMA.WriteLog(String type, String message, String action, String SigninName, string Password, String strNow)"

Custom Action for Sharepoint Designer

I'm going to create a custom action for Sharepoint Designer that creates a discussion thread in a discussion list based on the current list item.

I'm going to use the code found here and put it into a SPD custom action.

First create a Workflow Activity Library project in Visual Studio 2005.


Rename the Activity1 to MyCustomActivity and add a Code activity.


Add the Microsoft.Sharepint.dll and Microsoft.Sharepoint.WorkflowActions.dll assembly reference

Now we're going to create the input properties from where we're going to receive input data from the workflow.

public static DependencyProperty ListIdProperty = DependencyProperty.Register

("ListId", typeof(string), typeof(MyCustomActivity));


The ListIdProperty is going to receive the list ID of the list item that we're going to copy to the discussion list (a string representation of the Guid)..

public static DependencyProperty ToListIdProperty = DependencyProperty.Register

("ToListId", typeof(string), typeof(MyCustomActivity));


The ToListIdProperty is going to receive the discussion's list ID (a string representation of the Guid).

public static DependencyProperty ListItemProperty = DependencyProperty.Register

("ListItem", typeof(Int32), typeof(MyCustomActivity));


This is the list item ID

public static DependencyProperty __ContextProperty = DependencyProperty.Register

("__Context", typeof(WorkflowContext), typeof(MyCustomActivity));


And this is a special property that is going to have the workflow context to have access to the current SPWeb.

Then add the public properties

[Description("My description which can be any text I want.")]

[Category("My category which could be anything.")]




public string ListId


get {return ((string) (base.GetValue(MyCustomActivity.ListIdProperty)));}

set {base.SetValue(MyCustomActivity.ListIdProperty, value);}



[Description("My description which can be any text I want.")]

[Category("My category which could be anything.")]




public string ToListId


get {return ((string) (base.GetValue(MyCustomActivity.ToListIdProperty)));}

set {base.SetValue(MyCustomActivity.ToListIdProperty, value);}



[Description("My description which can be any text I want.")]

[Category("My category which could be anything.")]




public Int32 ListItem


get {return ((Int32) (base.GetValue(MyCustomActivity.ListItemProperty)));}

set {base.SetValue(MyCustomActivity.ListItemProperty, value);}



[Description("My description which can be any text I want.")]

[Category("My category which could be anything.")]




public WorkflowContext __Context


get {return ((WorkflowContext)(base.GetValue(MyCustomActivity.__ContextProperty)));}

set {base.SetValue(MyCustomActivity.__ContextProperty, value);}



Now just add the following code to the Code activity handler

private void _mainCodeActivity_ExecuteCode(object sender, EventArgs e)


// get the list

SPList sourceList = __Context.Web.Lists[new Guid(ListId)];


// get list item

SPListItem item = __Context.GetListItem(sourceList, ListItem);


// get the discussion list

SPList targetList = __Context.Web.Lists[new Guid(ToListId)];


// create the discussion item

SPListItem discussionItem = SPUtility.CreateNewDiscussion(targetList.Items, item.Title);




Sign the project with a key, compile and put the assembly in GAC.


Now you have to define the new action in the WSS.ACTIONS file found in \12\TEMPLATE\1033\Workflow

<Action Name="My Custom Action"


Assembly="SPDCustomActions, Version=, Culture=neutral, PublicKeyToken=a980f97a0f622f27"


Category="List Actions">

<RuleDesigner Sentence="Create discussion item in %1 to %2.">

<FieldBind Field="ListId,ListItem" Text="this list" Id="1" DesignerType="ChooseListItem" />

<FieldBind Field="ToListId" Text="this list" Id="2" DesignerType="ListNames" />



<Parameter Name="ListId" Type="System.String, mscorlib" Direction="In" />

<Parameter Name="ListItem" Type="System.Int32, mscorlib" Direction="In" />

<Parameter Name="ToListId" Type="System.String, mscorlib" Direction="In" />

<Parameter Name="__Context" Type="Microsoft.SharePoint.WorkflowActions.WorkflowContext, Microsoft.SharePoint.WorkflowActions" Direction="In" />




Then add the following line to the web.config file of your site collection

<authorizedType Assembly=" SPDCustomActions, Version=, Culture=neutral, PublicKeyToken=a980f97a0f622f27" Namespace=" SPDCustomActions" TypeName="*" Authorized="True" />


That's it! Test the action in Sharepoint Designer: