< Back
New-GoogleServiceAccountJWT
Post
NAME New-GoogleServiceAccountJWT
SYNOPSIS
Creates a new JWT from a Google service account.
SYNTAX
New-GoogleServiceAccountJWT [-ClientSecret] <String> [-Issuer] <String> [[-Audience] <String>]
[[-ValidityInSeconds] <Int32>] [[-Subject] <String>] [<CommonParameters>]
DESCRIPTION
This cmdlet creates a new JWT from Google service account credentials. The JWT can be used to gain
an access token for subsequent API calls.
The outputted JWT is a base64 url encoded string.
PARAMETERS
-ClientSecret <String>
The RSA private key in PEM format associated with the service account.
Required? true
Position? 1
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Issuer <String>
The service account email address.
Required? true
Position? 2
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Audience <String>
The URL the JWT is sent to for exchange for an access token. You do not need to specify
this parameter.
Required? false
Position? 3
Default value https://www.googleapis.com/oauth2/v4/token
Accept pipeline input? false
Accept wildcard characters? false
-ValidityInSeconds <Int32>
The number of seconds between 1 and 3600 that the JWT (and subsequent access token) is valid.
Required? false
Position? 4
Default value 3600
Accept pipeline input? false
Accept wildcard characters? false
-Subject <String>
The email address of the user for which the application is requesting delegated access.
Required? false
Position? 5
Default value
Accept pipeline input? false
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
None
OUTPUTS
System.String
NOTES
AUTHOR: Michael Haken
LAST UPDATE: 1/27/2018
-------------------------- EXAMPLE 1 --------------------------
PS C:\\>$JWT = New-GoogleServiceAccountJWT -ClientSecret $ClientSecret -Issuer $ClientId -Scope $Scopes -Subject
$Email
Creates a new JWT from the service account credentials that is used to get an access token.
RELATED LINKS
SYNOPSIS
Creates a new JWT from a Google service account.
SYNTAX
New-GoogleServiceAccountJWT [-ClientSecret] <String> [-Issuer] <String> [[-Audience] <String>]
[[-ValidityInSeconds] <Int32>] [[-Subject] <String>] [<CommonParameters>]
DESCRIPTION
This cmdlet creates a new JWT from Google service account credentials. The JWT can be used to gain
an access token for subsequent API calls.
The outputted JWT is a base64 url encoded string.
PARAMETERS
-ClientSecret <String>
The RSA private key in PEM format associated with the service account.
Required? true
Position? 1
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Issuer <String>
The service account email address.
Required? true
Position? 2
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Audience <String>
The URL the JWT is sent to for exchange for an access token. You do not need to specify
this parameter.
Required? false
Position? 3
Default value https://www.googleapis.com/oauth2/v4/token
Accept pipeline input? false
Accept wildcard characters? false
-ValidityInSeconds <Int32>
The number of seconds between 1 and 3600 that the JWT (and subsequent access token) is valid.
Required? false
Position? 4
Default value 3600
Accept pipeline input? false
Accept wildcard characters? false
-Subject <String>
The email address of the user for which the application is requesting delegated access.
Required? false
Position? 5
Default value
Accept pipeline input? false
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
None
OUTPUTS
System.String
NOTES
AUTHOR: Michael Haken
LAST UPDATE: 1/27/2018
-------------------------- EXAMPLE 1 --------------------------
PS C:\\>$JWT = New-GoogleServiceAccountJWT -ClientSecret $ClientSecret -Issuer $ClientId -Scope $Scopes -Subject
Creates a new JWT from the service account credentials that is used to get an access token.
RELATED LINKS