Id like to make a call to the EWS Getpersona-operation (https://docs.microsoft.com/en-us/exchange/client-developer/web-service-reference/getpersona-operation) but im unsure how I get the PersonaID that needs to be passed in?
Im assuming this is the ID of the person id like to retrieve the information about and in my instance I want this to the the logged in user.
Can anybody point me to where I might get this?
So to continue on the advice given I have been trying to make a call using the 'GetUserSetting' operation.
function sendRequest() {
console.log('get user');
mailbox.makeEwsRequestAsync(getRequest(), callback);
}
function getRequest() {
var result =
'<?xml version = "1.0" encoding = "utf-8" ?>' +
'<soap:Envelope xmlns:a="http://schemas.microsoft.com/exchange/2010/Autodiscover"' +
' xmlns:wsa="http://www.w3.org/2005/08/addressing"' +
' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"' +
' xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">' +
'<soap:Header>' +
'<a:RequestedServerVersion>Exchange2007_SP1</a:RequestedServerVersion>' +
'<wsa:Action>http://schemas.microsoft.com/exchange/2010/Autodiscover/Autodiscover/GetUserSettings</wsa:Action>' +
'<wsa:To>https://pod51042.outlook.com/autodiscover/autodiscover.svc</wsa:To>' +
'</soap:Header>' +
'<soap:Body>' +
'<a:GetUserSettingsRequestMessage xmlns:a="http://schemas.microsoft.com/exchange/2010/Autodiscover">' +
'<a:Request>' +
'<a:Users>' +
'<a:User>' +
'<a:Mailbox>emailhere</a:Mailbox>' +
'</a:User>' +
'</a:Users>' +
'<a:RequestedSettings>' +
'<a:Setting>PublicFolderInformation</a:Setting>' +
'</a:RequestedSettings>' +
'</a:Request>' +
'</a:GetUserSettingsRequestMessage>' +
'</soap:Body>' +
'</soap:Envelope>';
return result;
}
function callback(asyncResult) {
var result = asyncResult.value;
var context = asyncResult.context;
console.log('result :' + result);
console.log('context :' + context);
console.log('asyncResult :' + asyncResult);
debugger;
}
The result of both result and context are undefined and inspecting the asyncResult within the debugger gives simply 'The Request is Invalid'
