Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Queries per minute per user issue #350

Open
pompushko opened this issue May 3, 2021 · 2 comments
Open

Queries per minute per user issue #350

pompushko opened this issue May 3, 2021 · 2 comments

Comments

@pompushko
Copy link

pompushko commented May 3, 2021

Hello

How can I manage Quota exceeded issue when working with 5-10 of requests/users ?
I extend limit in Google API page. But doesn’t help...

Should I use pause between Get-GSUserLicense commands or any other solution?

[2021-04-01 11:13:30] [e] Cannot assign Google Vault Former Employee license. Please check manually![2021-04-01 11:13:30] [e] Cannot assign Google Vault Former Employee license. Please check manually!Get-GSUserLicense : Exception calling "Execute" with "0" argument(s): "Google.Apis.Requests.RequestErrorQuota exceeded for quota metric 'Queries' and limit 'Queries per minute per user' of service 'licensing.googleapis.com' for consumer 'project_number:XXXXXXXXXXXX'. [403]Errors [ Message[Quota exceeded for quota metric 'Queries' and limit 'Queries per minute per user' of service 'licensing.googleapis.com' for consumer 'project_number:XXXXXXXXXXXX'.] Location[ - ] Reason[rateLimitExceeded] Domain[usageLimits]]"At ManageExpiredAccounts.ps1:267 char:18+ ... if(!(Get-GSUserLicense -User (get-aduser $UserAccount.SamAccou ...+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : NotSpecified: (:) [Write-Error], WriteErrorException + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Get-GSUserLicense Get-GSUserLicense : Exception calling "Execute" with "0" argument(s): "Google.Apis.Requests.RequestErrorUser does not have a license for specified sku and product [404]Errors [ Message[User does not have a license for specified sku and product] Location[ - ] Reason[notFound] Domain[global]]"At ManageExpiredAccounts.ps1:269 char:22+ ... if(!(Get-GSUserLicense -User (get-aduser $UserAccount.SamAccou ...+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : NotSpecified: (:) [Write-Error], WriteErrorException + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Get-GSUserLicense [2021-04-01 11:13:31] [w] License Google Vault Former Employee is here!

@Buenno
Copy link

Buenno commented Jun 5, 2021

I'm unable to replicate this error, are you able to share your script?

@pompushko
Copy link
Author

pompushko commented Jul 1, 2021

 function SearchGSuiteUserLicenses($UserEmail)
{
    # Check GSuite Licenses
    Start-Sleep -s 1
    $AccountGSuiteLicenses = Get-GSUserLicense -User $UserEmail -CheckAll -Verbose

    if ($AccountGSuiteLicenses -ne $null){
        return (($AccountGSuiteLicenses | Select-Object -Expand SkuName) -join ', ')
    }
    else{
        return $null
    }
} 

Btw, I face issue, when user has license, but Get-GSUserLicense show warning with "No license found for user". It happens....

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants