Query to ensure a user doesn't exist - InfoPath Dev
in

InfoPath Dev

Query to ensure a user doesn't exist

Last post 04-09-2012 09:16 AM by Transient. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 04-05-2012 09:27 AM

    Query to ensure a user doesn't exist

    I'm trying to create a form to automate the process of creating user ID's in Active Directory using SharePoint 2010 Enterprise, InfoPath 2010, and PowerShell. I'd like to verify whether a user exists from within the InfoPath form rather than a PowerShell script. I've tried connecting InfoPath to a secondary web service, http://mysharepointserver/_vti_bin/UserGroup.asmx and using the GetUserInfo query, however, this requires a valid user ID to query. It actually gives me back the exact message I'd like, but InfoPath assumes I don't want errors in my queries and won't let me proceed. Is there another way to do this? Thanks for your help!
  • 04-09-2012 06:16 AM In reply to

    Re: Query to ensure a user doesn't exist

    Hi Trans and welcome,

    Why can't you just use a rule that checks to see if the result of the GetUserInfo is blank? In other words, assume that the command succeeds and uncheck the stop rules on failure and have a rule after the query that checks the value?

    Patrick Halstead
    Project Manager at Qdabra
  • 04-09-2012 09:16 AM In reply to

    Re: Query to ensure a user doesn't exist

    Sorry, I actually figured it out and forgot to post it back here. The reason I couldn't check to see if GetUserInfo was blank is when InfoPath runs the query and SharePoint returns an error saying it is a non-existent user, InfoPath read the response as this was an invalid SOAP request and threw up it's own error saying the data connection query was bad. I ended up finding the ResolvedPrincipals method within People.asmx which is used for exactly what I was trying to do. Thanks!
Page 1 of 1 (3 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.