diff --git a/src/DIRAC/WorkloadManagementSystem/Service/WMSUtilities.py b/src/DIRAC/WorkloadManagementSystem/Service/WMSUtilities.py index 0d1f5c85c29..18e3dabacee 100644 --- a/src/DIRAC/WorkloadManagementSystem/Service/WMSUtilities.py +++ b/src/DIRAC/WorkloadManagementSystem/Service/WMSUtilities.py @@ -84,7 +84,8 @@ def setPilotCredentials(ce, pilotDict): :param pilotDict: pilot parameter dictionary :return: S_OK/S_ERROR """ - if "Token" in ce.ceParameters.get("Tag", []): + vo = getVOForGroup(pilotDict["OwnerGroup"]) + if "Token" in ce.ceParameters.get("Tag", []) or f"Token:{vo}" in ce.ceParameters.get("Tag", []): result = gTokenManager.getToken( userGroup=pilotDict["OwnerGroup"], scope=PILOT_SCOPES,