Unable to do ios build

I have created a profile in ionic dashboard and uploaded the .p12 and mobile provision.

I get the below error when i issue package build command,

ionic package build ios --profile profilename

× Retrieving security profile profilename - failed!
Request: GET https://api.ionic.io/security/profiles/profilename
Response: 404
{ message: ‘Profile not found.’, type: ‘NotFound’, link: null }

Many thanks in advance!

Below is my ionic info:

cli packages: (C:\Users\username\AppData\Roaming\npm\node_modules)

@ionic/cli-utils  : 1.19.0
ionic (Ionic CLI) : 3.19.0

local packages:

@ionic/app-scripts : 3.1.0
Ionic Framework    : ionic-angular 3.9.2


Node : v6.9.2
npm  : 3.10.9
OS   : Windows 10


backend : legacy