Code Monkey home page Code Monkey logo

slacktoteamsmigration's Introduction

SlackToTeamsMigration

Prerequisites

To run the completed project in this folder, you need the following:

  • The .NET SDK installed on your development machine.

  • A Microsoft work or school account.

If you don't have a Microsoft account, you can sign up for the Microsoft 365 Developer Program to get a free Microsoft 365 subscription.

Register Application

  1. Open a browser and navigate to the Azure Active Directory admin center and login using a personal account (aka: Microsoft Account) or Work or School Account.

  2. [CLICK ME] Select Azure Active Directory in the left-hand navigation, then select App registrations under Manage.
  3. Register a new application to the Azure Active Directory

    1. [CLICK ME] Select New registration.
    2. Enter a name for your application, for example, STMigration.

  4. Set Supported account types as desired. The options are:

    Option Who can sign in?
    Accounts in this organizational directory only Only users in your Microsoft 365 organization
    Accounts in any organizational directory Users in any Microsoft 365 organization (work or school accounts)
    Accounts in any organizational directory ... and personal Microsoft accounts Users in any Microsoft 365 organization (work or school accounts) and personal Microsoft accounts
  5. Leave Redirect URI empty.

  6. Select Register.

  7. [CLICK ME] Get the Client and Tenant ID on the application's Overview page
    1. Copy the value of the Application (client) ID and save it, you will need it later.

    2. Also copy the Directory (tenant) ID and save it.

  8. [CLICK ME] Enable public client flows
    1. Select Authentication under Manage.

    2. Locate the Advanced settings section and change the Allow public client flows toggle to Yes, then choose Save.

Configure AAD Application

Note: This section requires a work/school account with the Global administrator role.

  1. Select API permissions under Manage.

  2. Remove the default User.Read permission under Configured permissions by selecting the ellipses (...) in its row and selecting Remove permission.

  3. [CLICK ME] Select Add a permission, then Microsoft Graph
    1. Select Application permissions.

    2. [CLICK ME] Select Teamwork.Migrate.All
    3. Select TeamMember.ReadWrite.All

    4. Select ChannelSettings.ReadWrite.All

    5. then select Add permissions.

  4. [CLICK ME] Select Grant admin consent for..., then select Yes to provide admin consent for the selected permission.
  5. Select Certificates and secrets under Manage, then select New client secret.

    1. [CLICK ME] Enter a description, choose a duration, and select Add.
    2. [CLICK ME] Copy the secret from the Value column, you will need it soon.
  6. Go to the online Graph Explorer

    1. [CLICK ME] Run the default command: GET my profile
      https://graph.microsoft.com/v1.0/me
    2. [CLICK ME] Copy the team user id and save it, you will need it in the next step!

Configure App Settings

Open appsettings.json and update the values according to the following table.

Setting Value
Tenant The tenant ID of your organization
ClientId The client ID of your app registration
ClientSecret The value of the client secret
OwnerUserId The user ID of your team account

Build and Run

In your command-line interface (CLI), navigate to the project directory and run the following commands.

dotnet restore
dotnet build
dotnet run

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.