1. OCAU Merchandise is available! Check out our 20th Anniversary Mugs, Classic Logo Shirts and much more! Discussion in this thread.
    Dismiss Notice

Update Active Directory via API

Discussion in 'Business & Enterprise Computing' started by lavi, Oct 12, 2016.

  1. lavi

    lavi Member

    Joined:
    Dec 20, 2002
    Messages:
    4,008
    Location:
    Brisbane
    So is there such thing? like a rest/soap API where one can update a users phone number, email, address?
     
  2. NSanity

    NSanity Member

    Joined:
    Mar 11, 2002
    Messages:
    18,655
    Location:
    Brisbane
    Does PS support rest?

    That would be the way I would think you can.
     
  3. elvis

    elvis OCAU's most famous and arrogant know-it-all

    Joined:
    Jun 27, 2001
    Messages:
    46,813
    Location:
    Brisbane
    LDAP. Born of the 1980s.
     
  4. OP
    OP
    lavi

    lavi Member

    Joined:
    Dec 20, 2002
    Messages:
    4,008
    Location:
    Brisbane
    yeah but i'm looking at something simple, rest call update these fields and done ....like

    Dim x As IADs
    Set x = GetObject("LDAP://CN=Administrator,CN=Users,DC=intranet,DC=com")
    x.PutEx ADS_PROPERTY_UPDATE, "OtherHomePhone", Array("8888", "9999")
    x.SetInfo

    and done

    how hard is it to create a windows/AD API
     
  5. PabloEscobar

    PabloEscobar Member

    Joined:
    Jan 28, 2008
    Messages:
    14,678
  6. OP
    OP
    lavi

    lavi Member

    Joined:
    Dec 20, 2002
    Messages:
    4,008
    Location:
    Brisbane
    I have a php app where users live in and they authenticate via ADFS (SAML) so if they update their number I want a rest call to AD and bam
     
  7. Luke212

    Luke212 Member

    Joined:
    Feb 26, 2003
    Messages:
    10,277
    Location:
    Sydney
    Last edited: Oct 12, 2016
  8. PabloEscobar

    PabloEscobar Member

    Joined:
    Jan 28, 2008
    Messages:
    14,678
    I think you may need to roll your own then.

    If you have Exchange in the environment, you may be able to leverage Exchange Web Services to achieve your end goal. (https://msdn.microsoft.com/en-us/library/office/jj220535(v=exchg.80).aspx) Depending on what roles your users have, they may be able to change some of their own details via it.

    And how exactly is that c# api exposed via REST?
     
    Last edited: Oct 12, 2016
  9. Luke212

    Luke212 Member

    Joined:
    Feb 26, 2003
    Messages:
    10,277
    Location:
    Sydney
    Last edited: Oct 12, 2016
  10. OP
    OP
    lavi

    lavi Member

    Joined:
    Dec 20, 2002
    Messages:
    4,008
    Location:
    Brisbane
    i think that's too complicated as the php application is in a different DC

    essentially the php application has SSO via ADFS (SAML) and I need to be able to write back to AD from the php application some fields for the logged in user via preferably REST or SOAP
     
  11. Dre_

    Dre_ Member

    Joined:
    May 25, 2014
    Messages:
    841
    You could use Azure Automation to receive the variables via API and then run a PS script with those variables i.e. updated phone number.
     

Share This Page

Advertisement: