Skip to content

GitHub Action to synchronise users between an Azure AD Group and an enterprise/organization

License

Notifications You must be signed in to change notification settings

PRODYNA/sync-enterprise

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

50 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

sync-enterprise

GitHub Action that syncs GitHub users with Azure AD users.

Usage on CLI

$ Usage of sync-enterprise:
  -azure-client-id string
    	The Azure Client ID.
  -azure-client-secret string
    	The Azure Client Secret.
  -azure-group string
    	The Azure Group.
  -azure-tenant-id string
    	The Azure Tenant ID.
  -dry-run
    	Dry run mode. (default true)
  -github-enterprise string
    	The GitHub Enterprise to query for repositories.
  -github-token string
    	The GitHub Token to use for authentication. 

Usage in GitHub Actions

name: Sync enterprise

on:
  workflow_dispatch:
  # Every day at 08:00
  schedule:
    - cron: '0 8 * * *'
  push:
    branches:
      - main

jobs:
  sync-enterprise:
    name: Sync enterprise
    runs-on: ubuntu-latest
    steps:

      # Find enterprise users to delete
      - name: Sync enterprise
        uses: prodyna/[email protected]
        with:
          github-token: ${{ secrets.DFE_GITHUB_TOKEN }}
          github-enterprise: "prodyna"
          dry-run: "false"
          azure-group: ${{ vars.DFE_AZURE_GROUP_ID }}
          azure-tenant-id: ${{ vars.DFE_TENANT_ID }}
          azure-client-id: ${{ vars.DFE_AZURE_CLIENT_ID }}
          azure-client-secret: ${{ secrets.DFE_AZURE_CLIENT_SECRET }}

Token permissions

The token needs the following permissions:

  • admin:org

About

GitHub Action to synchronise users between an Azure AD Group and an enterprise/organization

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Languages

  • Go 99.0%
  • Dockerfile 1.0%