Coder Social home page Coder Social logo

computerdan / o365_graphapi_ugroupcreationautomated Goto Github PK

View Code? Open in Web Editor NEW
2.0 2.0 1.0 13 KB

Office 365 Generic OATH Header POST Invoke-Header Powershell Script to Create Unified Group with Owners and Members

License: Apache License 2.0

PowerShell 100.00%
office 365 powershell graphapi unified groups

o365_graphapi_ugroupcreationautomated's Introduction

O365_GraphAPI_UGroupCreationAutomated

DLC 03/15/2019 - Public Distro version Created
DLC uPenn 03/11/2019 - Generic OATH Header POST Invoke-Header Powershell Script to Create Unified Group with Owners and Members
DLC uPenn 04/05/2019 - Adding Support to Get Owners/Members and report back Created Group info including Owners/Members
DLC uPenn 04/05/2019 - If Members Blank - Copy Oweners to Members - O365 does not display groups in user GUIs when user is an owner but not a member
                   
DLC uPenn 04/05/2019 - Adding support for allowExternalSenders and autoSubscribeNewMembers for when Graph API supports it 
                 - Currently known issue for allowExternalSenders not working with Post/Patch 
                   reference: https://docs.microsoft.com/en-us/graph/known-issues
                 - autoSubscribeNewMembers setting currently requires deligated auth to enable, which is not supported in this script
<CurrentVersion> Represenation - DLC 03/15/2019

PUBLIC Version - This script DOES NOT contain sensitive or propriatory information

Reference: https://docs.microsoft.com/en-us/graph/api/group-post-groups?view=graph-rest-1.0

GraphAPI Application must be registered and given this access:
                         	Application:  Group.ReadWrite.All
                         	Application:  User.Read.All  Only needed if adding Group Owners or Members

This script expects Application Access - Not Deligated Access, as no username/password signin information is being collected/processed.
This script is intended for automated Unified Group Creation (no user interaction)

Owners and Members must be provided in an Array - using AzureAD GUID representation for each user

This script is unsigned

	--Script Call Examples--

		Simplest script call example:        (will create a mail enabled Unified Group with "MyAutomatedGroup01" Displayname and "[email protected]" email address)
			.\Create-uGroup_PublicDistro.ps1 -TenantID 'fe03a341-0421-1234-4321-12345678abcd' -ClientID "gg034614-0421-1234-4321-12345678abcd" -ClientSecret 'safo;?ij;eroiejr23;s~!e3v' -redirectURL "urn:ietf:wg:oauth:2.0:oob" -GroupDisplayName "MyAutomatedGroup01"

		Script call example with Owners and Members:
			.\Create-uGroup_PublicDistro.ps1 -TenantID 'fe03a341-0421-1234-4321-12345678abcd' -ClientID "gg034614-0421-1234-4321-12345678abcd" -ClientSecret 'safo;?ij;eroiejr23;s~!e3v' -redirectURL "urn:ietf:wg:oauth:2.0:oob" -GroupDisplayName "MyAutomatedGroup01" -GroupOwnerGUIDs ("ff02050a-abcd-1234-efgh-56833853f78e","b29fff3a-abcd-1234-efgh-5d0359224d7f","3d0ed4c0-abcd-1234-efgh-a39c5240b168") -GroupMemberGUIDs ("40a0b8dc-abcd-1234-efgh-c9e018656dcd","0b85cc49-abcd-1234-efgh-ea5635e33826")

		Custom Call, with AAD_UIDs of individual owners,members specified as well as Manual Group Description and left side email address name ([email protected])
			.\Create-uGroup_PublicDistro.ps1 -TenantID 'fe03a341-0421-1234-4321-12345678abcd' -GroupDisplayName "MyAutomatedGroup01" -GroupDescription "Test Group with Manual Entries"-GroupMailEnabled $true -GroupMailNickName "MyAutomatedGroup01emailaddress" -GroupOwnerGUIDs ("ff02050a-abcd-1234-efgh-56833853f78e","b29fff3a-abcd-1234-efgh-5d0359224d7f","3d0ed4c0-abcd-1234-efgh-a39c5240b168") -GroupMemberGUIDs ("40a0b8dc-abcd-1234-efgh-c9e018656dcd","0b85cc49-abcd-1234-efgh-ea5635e33826")

o365_graphapi_ugroupcreationautomated's People

Contributors

computerdan avatar

Stargazers

 avatar  avatar

Watchers

 avatar  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.