-
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e33df64
commit 48b2147
Showing
4 changed files
with
40 additions
and
4 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
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
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,28 @@ | ||
function Get-GraphToken { | ||
<# | ||
.SYNOPSIS | ||
Retrieve the currently used graph token. | ||
.DESCRIPTION | ||
Retrieve the currently used graph token. | ||
Use one of the Connect-Graph* commands to first establish a connection. | ||
The token retrieved is a static copy of the current token - it will not be automatically refreshed once expired. | ||
.EXAMPLE | ||
PS C:\> Get-GraphToken | ||
Retrieve the currently used graph token. | ||
#> | ||
[CmdletBinding()] | ||
param ( | ||
|
||
) | ||
process { | ||
[PSCustomObject]@{ | ||
Token = $script:token | ||
Created = $script:lastConnect.When | ||
HasRefresh = $script:lastConnect.Refresh -as [bool] | ||
Endpoint = $script:baseEndpoint | ||
} | ||
} | ||
} |
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