$OnBehalfOf; AdminP; Mail file owners etc

Hi All,

I’ve done a load of searching for info relating to this in these forums but have found next to nothing.

I’m currently banging my head against the wall with the functionality offered by the ability to “Sign agents to run on behalf of others”. We felt that this functionality could help with the issue of people forgetting to enable their OOO agent before going away on hols.

We tested the settings by manually editing the OOO profile and then manually setting the $OnBehalfOf info in the agent and the manually enabling the agent. No problems. Works beautifully.

Then we thought - “hey, why not create a nice little shell around this functionality so that an admin can just click a button and everything will be done for them”. This is where the headbanging started.

Initially I thought that programmatically updating the User’s OOO profile (no problems there) grabbing the agent doc programmatically and simply adding an item named $OnBehalfOf with the name of the user would be the simple solution. However, even if I sign the item and the document before saving it I still get a message stating “This agent contains an illegally added ‘On Behalf’ attribute. To make the agent valid, please remove it.”

…Ok I thought - another approach required. I thought that I could programmatically create an AdminP request to enable the agent using the “ConfigureMailAgent” method. However - it seems that this method ignores the fact that I have the rights to sign agents to run on another users behalf. Whenever I create the AdminP request (and yes - I use full canonical names) the request is created successfully yet fails with the message “Title: File name: mail/oooTest; Name: OOO Enabler/TEST; Error: The signer of this request must be the mail file’s owner.”…

I have even tried having my script temporarily set the mailfile owner to the name of the admin running the script - even that fails with the same message.

I’m at my wits end. As far as I can see I am have everything configured correctly (proven by my ‘manual’ tests) yet any attempt to carry this out programmatically is thwarted.

Any ideas anyone ?

Many thanks,

Tom.

Subject: $OnBehalfOf; AdminP; Mail file owners etc…

There is a lot of information on this topic in the Agent FAQ, including a 2 part article written about a months ago about Out of office and troubleshooting all known issues, including delegation. It goes over the particulars of ConfigureMailAgent, AdminP, and all the rights as well as my suggestions on what it would take to add delegation - which is I think the issue you are trying to solve.