Currently getting this error: Error managing archive license for xxxx@domain.com: <HttpError 503 when requesting https://licensing.googleapis.com/apps/licensing/v1/product/101034/sku/1010340001/user?alt=json returned "Backend Error". Details: "[{'message': 'Backend Error', 'domain': 'global', 'reason': 'backendError'}]"> Only occurs when trying to assign a user the Google Workspace Archived User license assignment. If I try to assign the user an active license, the code executes flawlessly without error (especially the 503 - 'backendError'). I am attempting to revoke a users active license and then assign them a new archive license automatically. Is this a google issue or is there a error within my code-block? SKU_MAP_TO_ARCHIVE = { '1010020020': '1010340001' # Google Workspace Enterprise Plus -> Enterprise Plus - Archived User } ACTIVE_PRODUCT_ID = 'Google-Apps' ARCHIVE_PRODUCT_ID = 101034 PRODUCT_IDS_TO_CHECK = list(set([ACTIVE_PRODUCT_ID])) def change_user_license_to_archive(user_email, current_sku_id): """Changes a user's active license to an appropriate archive license.""" credentials = service_account.Credentials.from_service_account_file(SERVICE_ACCOUNT_FILE, scopes=SCOPES, subject='xxxSuperADMIN@domain.com') licensing_service = build('licensing', 'v1', credentials=credentials) if not licensing_service: print(f"Error: Licensing API service could not be built for license change for {user_email}.") return False print("valid licenseing service") archive_sku_id = SKU_MAP_TO_ARCHIVE.get(current_sku_id) if not archive_sku_id: print(f"Error: No archive SKU mapped for current SKU ID {current_sku_id} for user {user_email}.") return False try: # Determine the correct product ID for deleting the current license # Most active Workspace licenses are under 'Google-Apps' product ID # If the current SKU ID is already an 'archived user' SKU, then use ARCHIVE_PRODUCT_ID (101034) delete_product_id = ACTIVE_PRODUCT_ID if current_sku_id in SKU_MAP_TO_ARCHIVE.values(): delete_product_id = ARCHIVE_PRODUCT_ID print(f"Attempting to revoke active license ({current_sku_id}) for {user_email} (Product ID for deletion: {delete_product_id})...") licensing_service.licenseAssignments().delete( productId=delete_product_id, skuId=current_sku_id, userId=user_email ).execute() print(f"Successfully revoked active license for {user_email}.") # Assign the archive license print(f"Attempting to assign archive license ({archive_sku_id}) for {user_email} (Product ID for assignment: {ARCHIVE_PRODUCT_ID})...") licensing_service.licenseAssignments().insert( body={ 'userId': user_email, }, productId=101034, skuId=1010340001, # archive sku id ).execute() print(f"Successfully assigned archive license for {user_email}.") return True except Exception as e: print(f"Error managing archive license for {user_email}: {e}") return False I've tried sending the productId and skuId as both strings and integers in the http call. Still receive the 503 error when trying to assign users an archive license. Wondering if it's an internal Google issue or whether there is a configuration I am missing in my environment. Continue reading...