{"id":6036,"date":"2020-02-27T00:34:39","date_gmt":"2020-02-27T05:34:39","guid":{"rendered":"https:\/\/www.rushworth.us\/lisa\/?p=6036"},"modified":"2020-02-27T00:34:39","modified_gmt":"2020-02-27T05:34:39","slug":"adding-member-to-ms-teams-without-admin-rights-or-graph-api","status":"publish","type":"post","link":"https:\/\/www.rushworth.us\/lisa\/?p=6036","title":{"rendered":"Adding member to MS Teams without admin rights or Graph API"},"content":{"rendered":"<p># To run on Linux, you need the preview mode of AzureAD<br \/>\n# Register-PackageSource -Trusted -ProviderName &#8216;PowerShellGet&#8217; -Name &#8216;Posh Test Gallery&#8217; -Location https:\/\/www.poshtestgallery.com\/api\/v2\/<br \/>\n# Install-Module -Name AzureAD.Standard.Preview<\/p>\n<p># Windows, the module is<br \/>\n# Install-Module -Name AzureAD<\/p>\n<p># I&#8217;m lazy and just typed my creds for a proof of concept; real implementation would use the SecureString thing in the connect-azuread. See:<br \/>\n# <a href=\"https:\/\/www.rushworth.us\/lisa\/?p=3294\">https:\/\/www.rushworth.us\/lisa\/?p=3294<\/a><br \/>\nconnect-azuread<\/p>\n<p># Get the object ID for the group and the user<br \/>\n$objMyGroup = get-azureadgroup -SearchString &#8220;LJR Sandbox Team&#8221;<br \/>\n$objNewMember = get-azureaduser -searchstring &#8220;NewGuy&#8221;<\/p>\n<p># Add the user to the group<br \/>\nadd-azureadgroupmember -ObjectID $objMyGroup.ObjectId -RefObjectID $objNewMember.ObjectId<\/p>\n","protected":false},"excerpt":{"rendered":"<p># To run on Linux, you need the preview mode of AzureAD # Register-PackageSource -Trusted -ProviderName &#8216;PowerShellGet&#8217; -Name &#8216;Posh Test Gallery&#8217; -Location https:\/\/www.poshtestgallery.com\/api\/v2\/ # Install-Module -Name AzureAD.Standard.Preview # Windows, the module is # Install-Module -Name AzureAD # I&#8217;m lazy and just typed my creds for a proof of concept; real implementation would use the SecureString &hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[677,30],"tags":[663,666],"class_list":["post-6036","post","type-post","status-publish","format-standard","hentry","category-office-365","category-system-administration","tag-azure-ad","tag-microsoft-teams"],"_links":{"self":[{"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=\/wp\/v2\/posts\/6036","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=6036"}],"version-history":[{"count":1,"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=\/wp\/v2\/posts\/6036\/revisions"}],"predecessor-version":[{"id":6037,"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=\/wp\/v2\/posts\/6036\/revisions\/6037"}],"wp:attachment":[{"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=6036"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=6036"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=6036"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}