Customsettings.in webservice call is not working

Sep 7, 2011 at 4:27 PM
Edited Sep 7, 2011 at 6:48 PM

I am new to web services and I am trying to call it from my customsettings.ini file but I can not seem to get it to work

I am trying to display a task sequence based on the group a user is in. Here is what i have so far but it does not seem to be calling the web service. Looking for some guidance

[Settings]
Priority=Default, SetTaskSequence, ShowTaskSequence
Properties=MyCustomProperty, IsUserGroupMemberAdmin

[SetTaskSequence]
WebService=http://mysebsite.com/Deployment%20Webservice/ad.asmx/IsUserGroupMember
Parameters=Username,GroupName
Username=%UserID%
GroupName=IT-Admins
Method=GET
IsUserGroupMemberAdmin=string

[ShowTaskSequence]
SubSection=Admin-%IsUserGroupMemberAdmin%

[Admin-True]
WizardSelectionProfile=admintasksequences

 

Just a note I set up the Deployment Webservice for windows authentication (all others are disabled) and authorization rules are set to a group I am in.

Sep 7, 2011 at 7:40 PM
Edited Sep 7, 2011 at 7:52 PM

I ended up changing around things and now I get a response from web services : 200 OK but I can not get the value back.  I thought IsUserGroupMemberAdmin=string would get the value but it gets nothing. What am missing???

 

[Settings]
Priority=Default, SetTaskSequence, ShowTaskSequence
Properties=MyCustomProperty, IsUserGroupMemberAdmin, Username, Groupname

[Default]

Username=%UserID%
Groupname=IT-Admin

[SetTaskSequence]

WebService=http://mdtwds.bc.edu/Deployment%20Webservice/ad.asmx/IsUserGroupMember
Parameters=Username,GroupName
IsUserGroupMemberAdmin=string

[ShowTaskSequence]
SubSection=Admin-%IsUserGroupMemberAdmin%

[Admin-True]
WizardSelectionProfile=admintasksequences

Sep 7, 2011 at 10:45 PM

Ok I finally figured it out. IsUserGroupMember returns a boolean not a string so you need to use that instead. I also rearranged things around a bit. This is the customsettings.ini that got this working:

[Settings]
Priority=INT, SetTaskSequenceAdmin, SetTaskSequenceDefault, Default
Properties=MyCustomProperty, IsGroupMemberAdmin, UsersGroupadmins, Username, Groupname

[INT]
UsersGroupadmins=IT-Admins

[Default]
SkipDeploymentType=NO
OSInstall=YES

[SetTaskSequenceAdmin]

WebService=http://mywebsite.com/Deployment%20Webservice/ad.asmx/IsUserGroupMember
Parameters=UserID,UsersGroupadmins
UserID=Username
UsersGroupadmins=Groupname
IsGroupMemberAdmin=boolean
SubSection=Admin-%IsGroupMemberAdmin%
[Admin-True]
WizardSelectionProfile=ShowAdmintaskSequences


[SetTaskSequenceDefault]
WizardSelectionProfile=ShowDefaultTaskSequences

 

If a user is part of the IT-Admins group then they will see the task sequences associated with ShowAdmintaskSequences selection profile (Set up in MDT workbench)

If not then it will show task sequences associated with ShowDefaultTaskSequences.

 

Note: Once WizardSelectionProfile is set it can not be overwritten. I am using MaikKoster.Deployment.Webservice 7.3 beta. The command ad.asmx/IsUserGroupMember will only work if a person is a direct member of the group (does not do group inside of groups) I emailed Maik about this and he said he will look into this. Thanks Maik!