Adldap2-Laravel icon indicating copy to clipboard operation
Adldap2-Laravel copied to clipboard

Create exchange mailbox and bind it to new created ad user

Open vbaseghyanupwork opened this issue 5 years ago • 0 comments

Adldap2 Version: Master LDAP Type: ActiveDirectory PHP Version: 7.3 Laravel version: 5.8

Just want to check, if there any updates regarding exchange mailbox creation, since last time I've seen mention about that around 1 or 2 years ago in issues.

I'm creating users like this.

` $user = Adldap::make()->user([ 'cn' => 'test_cn', 'samaccountname' => 'test samaaccount', 'Company' => 'company', 'UserPrincipalName' => '[email protected]', 'givenname' => 'test', 'StreetAddress' => 'address', 'Department' => 'department', 'telephoneNumber' => 'xxxxxx', 'MailNickname' => '[email protected] ]);

    $user->objectclass = [
        'top',
        'person',
        'inetOrgPerson',
    ];

    $user->setPassword('Super-Secret-Password');
    $user->setAttribute('UserAccountControl', 512);
    $user->setAttribute('pwdLastSet',  0);

    $user->save();`

Wondering how I can use this as described here

http://adldap.sourceforge.net/wiki/doku.php?id=documentation_exchange_functions Not sure how to use this part

$create = $adldap->exchange()->createMailbox('AD.UserName', array('Mailbox Store', 'Storage Group', 'InformationStore', 'MAILSERVER01', 'Servers', 'First Administrative Group', 'Administrative Group', 'Development', 'Microsoft Exchange', 'Services', 'Configuration'), '[email protected]', 'AD User Name', TRUE, 'DC=someotherdomain,DC=local' );

Basically I need to create an mailbox and bind it to new created user.

Anyone tried that?

Thanks

vbaseghyanupwork avatar Jul 05 '20 21:07 vbaseghyanupwork