Change groupId.
Use session credential if it is present.