Can you use Active Directory Manager data in workflow?
I can’t seem to find a way to automatically rout a workflow task to a user’s manager using the person’s "manager" value from Active Directory. This seems like such a basic task, but I don’t see any option for it in the workflow roles available in SharePoint or SharePoint Designer.
Has anyone had luck with this?
[550 byte] By [
NETDEV] at [2008-2-5]
I am quite surprised this is not supported out of the box... In all my days of building these tpyes of flows.. this is one of the most common ones that developers need to develop.
I am interested if you find a way to accomplish this, I know we can write a custom activity that will route the workflow to the persons manager but I am interested to see if it can be done without resorting to code :-)
If you are confortable in Visual Studio, post back and I can point you int he direction of developing your own workflow activities.. if this is too daunting for you I understand :-)
I would like to know how to do this as well. If it must be done in Visual Studio and not SharePoint Designer that is ok. As long as it's C# and not VB.
Thanks
I'm also very keen to learn how to achieve this. We will have several workflows that will require manager approval (eg. annual leave requests), so this is a biggie for us.
Cheers,
Matt
Well, Let's figure it out together then :-)
I am thinking that we will need to create a custom workflow activity ... are we using MOSS or WSS as a base ?
We will need a cusomt workflow that will create a request for approval but instead of asking the user to select the approval, we just want it to read from the AD (if we are using WSS) or the Profile Store (MOSS Only)
Anyone think of an easier way to accomplish this ? It doesn't seem like it would be that much code...
Should we also work in enough flexability into the activity to allow for multiple levels of approval (ie, keep going up the approval chain until you reach a user with (X) rights, Allow direct manager approval and then routinig to antoher location (ie expense reports) etc.. ?
Let' put some bounds around it and break out the Visual Studio :-)
I'd be happy if it were MOSS only - pull the manager from the profile store.
It would be cool to have multiple levels of approval, but right now my goal would be something like this:
User submits request, manager is notified.
If manager approves, payroll (which could be a fixed group in sharepoint or AD) is notified (but they don't need to approve).
Either way, user is notified that the request is approved or denied.
Hi All,
I'm very interested in knowing how to get the Manager from Profiles as well. It's a fundamental request from lot of customers who want to create workflows using SPD. Hope anybody knows the way. Maybe rolling up data? But how to do in SPD?
Jens
I found this site that has an Active Directory Role sample. I installed the WFSamples but haven't had time to look at them yet. I know that you can't access AD roles in InfoPath, and it might be the same for SharePoint Designer. I think Visual Studio will be the way to go.
http://msdn2.microsoft.com/en-us/library/ms741720.aspx
I say start with one workflow that grabs the Active Directory profile and just outputs the users name and the Manager of that user to the screen. That way we know it works.
-Mark
Have you had any luck figuring this out? I'm interested in a solution to this problem too. It seems particularly facial that MS wouldn't have included this functionality by default. I mean, what were they thinking..... ?
I haven't been able to get it working in WWF directly, but using a secondary datasource in an infopath form and the MOSS UserProfileService web service(google UserProfileService "sharepoint 2007" for more information) which is out of the box, I was able to populate a main datasource from the secondary datasource using the getcommonmanager method which provides name, account, and email(without input parameters assuming Windows Authentication is required for your SP server authentication). I was then able to use that data from the form library list item as part of the workflow(once I added the column in the form to publish to the site so it could be used in the workflow).
It would seem logical that WWF would allow you to invoke the same webservice and return the same parameters for variable assignment and usage. This assumes you are importing your profiles from AD and that active directory is populated. Other than writing a webservice directly against active directory, which I know is possible, this is the only out of the box way I have found. Hope that helps!
Now since SPD doesn't allow you to invoke a webservice and return the parameters, I'm trying to figure out how to get that manager's manager information, etc.. and send the workflow up additional levels for approval at each....at this point I'll try to add more secondary datasources, sending them the returned parameters of the previous results to return the next in the list, but that means I have to manually create fields for each manager level to the max level of potential managers, publish those as columns, and loop through them in the workflow, until I reach a level where the manager field is null(checking at each step), then stop the workflow and mark the list item approved. Haven't figured all that out yet...
I agree their should be a better way....