Giter Site home page Giter Site logo

canokcelik / mattermost-ad_import Goto Github PK

View Code? Open in Web Editor NEW

This project forked from cjohannsen81/mattermost-ad_import

0.0 1.0 0.0 1.96 MB

Powershell script to get Active-Directory users and create a JSON file to add users to Mattermost channels while importing with the bulk import tool.

PowerShell 100.00%

mattermost-ad_import's Introduction

Mattermost Active-Directory Import

This Powershell script gets all AD Users based on the given AD group and converts them into a JSON file that can be used for the Mattermost bulk import tool: https://docs.mattermost.com/deployment/bulk-loading.html

It allows to add the team and channels for the users. They will be part of these channels when logging in the first time.

Please note that the Enterprise Edition is needed.

  1. Just call the script (I used a sample Windows 2012 R2 domain controller). Please note that the script name is: import.ps1.

alt text

  1. The result is an import JSON file that matches the specifications of the bulk import tool.

alt text

  1. After you copied the JSON file to the Mattermost server, validate the import using the bulk import tool (/opt/mattermost/bin/): sudo ./platform import bulk /tmp/import.json --validate

alt text

  1. With switching the attribute from --validate to --apply the file import begins.

alt text

  1. You can check the imported user in the System Console of your Mattermost Server.

alt text

  1. Now you can try a login with one of the AD users to check the channel association.

alt text

  1. Finally you should be able to see the associated channels for this user (testchannel and secondone in my demo)

alt text

In case you want to change of enhance the script, feel free to create a pull request.

Author: Christian Johannsen

Twitter: cjohannsen81

mattermost-ad_import's People

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.