-
-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Get-O365CopilotPin function and example script for retrieving Cop…
…ilot PIN
- Loading branch information
1 parent
cb9cac6
commit 9228d6b
Showing
2 changed files
with
17 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
Import-Module .\O365Essentials.psd1 -Force | ||
|
||
# This makes a connection to Office 365 tenant | ||
# since we don't want to save the data we null it out | ||
# keep in mind that if there's an MFA you would be better left without Credentials and just let it prompt you | ||
$null = Connect-O365Admin -Verbose | ||
|
||
Get-O365CopilotPin -Verbose |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
function Get-O365CopilotPin { | ||
[cmdletbinding()] | ||
param( | ||
[alias('Authorization')][System.Collections.IDictionary] $Headers | ||
) | ||
$Uri = "https://admin.microsoft.com/admin/api/settings/company/copilotpolicy/pin" | ||
$OutputSettings = Invoke-O365Admin -Uri $Uri -Headers $Headers -Method GET | ||
$OutputSettings | ||
} |