diff --git a/README.md b/README.md
index eff7ba1f435f4284e06a3d69edc221aa4096fd34..61399a0a7d62aa4eacd275831153c3ec4dd3a300 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,6 @@
 # enedis-sge-konnector
 
-Retreving consumption data from Enedis SGE SOAP api 
+Retreving consumption data from Enedis SGE SOAP api
 
 ## Getting started
 
@@ -42,40 +42,50 @@ Use the built-in continuous integration in GitLab.
 - [ ] [Use pull-based deployments for improved Kubernetes management](https://docs.gitlab.com/ee/user/clusters/agent/)
 - [ ] [Set up protected environments](https://docs.gitlab.com/ee/ci/environments/protected_environments.html)
 
-***
+---
 
 # Editing this README
 
-When you're ready to make this README your own, just edit this file and use the handy template below (or feel free to structure it however you want - this is just a starting point!).  Thank you to [makeareadme.com](https://www.makeareadme.com/) for this template.
+When you're ready to make this README your own, just edit this file and use the handy template below (or feel free to structure it however you want - this is just a starting point!). Thank you to [makeareadme.com](https://www.makeareadme.com/) for this template.
 
 ## Suggestions for a good README
+
 Every project is different, so consider which of these sections apply to yours. The sections used in the template are suggestions for most open source projects. Also keep in mind that while a README can be too long and detailed, too long is better than too short. If you think your README is too long, consider utilizing another form of documentation rather than cutting out information.
 
 ## Name
+
 Choose a self-explaining name for your project.
 
 ## Description
+
 Let people know what your project can do specifically. Provide context and add a link to any reference visitors might be unfamiliar with. A list of Features or a Background subsection can also be added here. If there are alternatives to your project, this is a good place to list differentiating factors.
 
 ## Badges
+
 On some READMEs, you may see small images that convey metadata, such as whether or not all the tests are passing for the project. You can use Shields to add some to your README. Many services also have instructions for adding a badge.
 
 ## Visuals
+
 Depending on what you are making, it can be a good idea to include screenshots or even a video (you'll frequently see GIFs rather than actual videos). Tools like ttygif can help, but check out Asciinema for a more sophisticated method.
 
 ## Installation
+
 Within a particular ecosystem, there may be a common way of installing things, such as using Yarn, NuGet, or Homebrew. However, consider the possibility that whoever is reading your README is a novice and would like more guidance. Listing specific steps helps remove ambiguity and gets people to using your project as quickly as possible. If it only runs in a specific context like a particular programming language version or operating system or has dependencies that have to be installed manually, also add a Requirements subsection.
 
 ## Usage
+
 Use examples liberally, and show the expected output if you can. It's helpful to have inline the smallest example of usage that you can demonstrate, while providing links to more sophisticated examples if they are too long to reasonably include in the README.
 
 ## Support
+
 Tell people where they can go to for help. It can be any combination of an issue tracker, a chat room, an email address, etc.
 
 ## Roadmap
+
 If you have ideas for releases in the future, it is a good idea to list them in the README.
 
 ## Contributing
+
 State if you are open to contributions and what your requirements are for accepting them.
 
 For people who want to make changes to your project, it's helpful to have some documentation on how to get started. Perhaps there is a script that they should run or some environment variables that they need to set. Make these steps explicit. These instructions could also be useful to your future self.
@@ -83,27 +93,26 @@ For people who want to make changes to your project, it's helpful to have some d
 You can also document commands to lint the code or run tests. These steps help to ensure high code quality and reduce the likelihood that the changes inadvertently break something. Having instructions for running tests is especially helpful if it requires external setup, such as starting a Selenium server for testing in a browser.
 
 ## Authors and acknowledgment
+
 Show your appreciation to those who have contributed to the project.
 
 ## License
+
 For open source projects, say how it is licensed.
 
 ## Project status
-If you have run out of energy or time for your project, put a note at the top of the README saying that development has slowed down or stopped completely. Someone may choose to fork your project or volunteer to step in as a maintainer or owner, allowing your project to keep going. You can also make an explicit request for maintainers.
 
+If you have run out of energy or time for your project, put a note at the top of the README saying that development has slowed down or stopped completely. Someone may choose to fork your project or volunteer to step in as a maintainer or owner, allowing your project to keep going. You can also make an explicit request for maintainers.
 
-[Cozy][cozy] <YOUR SUPER NEW KONNECTOR NAME>
-=======================================
+# [Cozy][cozy] <YOUR SUPER NEW KONNECTOR NAME>
 
-What's Cozy?
-------------
+## What's Cozy?
 
 ![Cozy Logo](https://cdn.rawgit.com/cozy/cozy-guidelines/master/templates/cozy_logo_small.svg)
 
 [Cozy] is a personal data platform that brings all your web services in the same private space. With it, your webapps and your devices can share data easily, providing you with a new experience. You can install Cozy on your own hardware where no one's tracking you.
 
-What is this konnector about ?
-------------------------------
+## What is this konnector about ?
 
 This konnector retrieves your <SOME DATA> and <SOME OTHER DATA> from <SERVICE>
 <YOUR DESCRIPTION HERE>
@@ -112,8 +121,9 @@ This konnector retrieves your <SOME DATA> and <SOME OTHER DATA> from <SERVICE>
 
 If you want to work on this konnector and submit code modifications, feel free to open pull-requests!
 </br>See :
-* the [contributing guide][contribute] for more information about how to properly open pull-requests.
-* the [konnectors development guide](https://docs.cozy.io/en/tutorials/konnector/)
+
+- the [contributing guide][contribute] for more information about how to properly open pull-requests.
+- the [konnectors development guide](https://docs.cozy.io/en/tutorials/konnector/)
 
 ### Run and test
 
@@ -125,12 +135,14 @@ Create a `konnector-dev-config.json` file at the root with your test credentials
   "fields": {"login":"zuck.m@rk.fb", "password":"123456"}
 }
 ```
+
 Then :
 
 ```sh
 yarn
 yarn standalone
 ```
+
 For running the konnector connected to a Cozy server and more details see [konnectors tutorial](https://docs.cozy.io/en/tutorials/konnector/)
 
 ### Cozy-konnector-libs
@@ -141,7 +153,6 @@ This connector uses [cozy-konnector-libs](https://github.com/cozy/cozy-konnector
 
 The lead maintainers for this konnector is <YOUR NAME>
 
-
 ### Get in touch
 
 You can reach the Cozy Community by:
@@ -152,13 +163,11 @@ You can reach the Cozy Community by:
 - Posting issues on the [Github repos][github]
 - Say Hi! on [Twitter]
 
-
-License
--------
+## License
 
 <YOUR KONNECTOR NAME> is developed by <your name> and distributed under the [AGPL v3 license][agpl-3.0].
 
-[cozy]: https://cozy.io "Cozy Cloud"
+[cozy]: https://cozy.io 'Cozy Cloud'
 [agpl-3.0]: https://www.gnu.org/licenses/agpl-3.0.html
 [libera]: https://web.libera.chat/#cozycloud
 [forum]: https://forum.cozy.io/
diff --git a/index.js b/index.js
index 118d98e83f8d82ae28265f3ccd8ee31bce8c0967..be461447dcc84d2206e755ecc17d56812ddcce86 100644
--- a/index.js
+++ b/index.js
@@ -39,8 +39,8 @@ const {
   terminateContract,
   getContractStartDate,
 } = __webpack_require__(1595)
-const { getAccount, saveAccountData } = __webpack_require__(1604)
-const { isLocal } = __webpack_require__(1605)
+const { getAccount, saveAccountData } = __webpack_require__(1605)
+const { isLocal } = __webpack_require__(1606)
 
 moment.locale('fr') // set the language
 moment.tz.setDefault('Europe/Paris') // set the timezone
@@ -55,7 +55,7 @@ let startDailyDateString = startDailyDate.format('YYYY-MM-DD')
 const startLoadDate = moment().subtract(7, 'day')
 const endDate = moment()
 const endDateString = endDate.format('YYYY-MM-DD')
-const ACCOUNT_ID = isLocal() ? 'default_account_id' : 'enedis-sge-grandlyon'
+const ACCOUNT_ID = isLocal() ? 'default_account_id' : 'enedissgegrandlyon'
 
 module.exports = new BaseKonnector(start)
 
@@ -70,6 +70,7 @@ module.exports = new BaseKonnector(start)
  */
 async function start(fields, cozyParameters) {
   log('info', 'Konnector configuration ...')
+  log('info', `isManual exectuion: ${manualExecution}`)
 
   const pointId = parseInt(fields.pointId)
   let baseUrl = fields.wso2BaseUrl
@@ -112,6 +113,7 @@ async function start(fields, cozyParameters) {
   log('info', 'User Logging...')
 
   if (isFirstStart(await getAccount(ACCOUNT_ID))) {
+    log('info', 'First start...')
     const user = await verifyUserIdentity(fields, baseUrl, apiAuthKey, sgeLogin)
 
     let consent = await createBoConsent(
@@ -122,7 +124,9 @@ async function start(fields, cozyParameters) {
       user.firstname,
       user.address,
       user.postalCode,
-      user.inseeCode
+      user.inseeCode,
+      user.city,
+      user.hasBeenThroughtSafetyOnBoarding
     )
 
     // handle user contract start date in order to preperly request data
@@ -132,6 +136,7 @@ async function start(fields, cozyParameters) {
       sgeLogin,
       pointId
     )
+
     startDailyDate = moment(userContractstartDate, 'YYYY-MM-DD')
     startDailyDateString = startDailyDate.format('YYYY-MM-DD')
 
@@ -171,9 +176,11 @@ async function start(fields, cozyParameters) {
     await saveAccountData(this.accountId, {
       ...accountData.data,
       consentId: consent.ID,
+      expirationDate: contractEndDate,
+      inseeCode: user.inseeCode,
     })
   } else {
-    // AlternateStart
+    log('info', 'Alternate start...')
     const accountData = await getAccount(ACCOUNT_ID)
     const userConsent = await getBoConsent(
       boBaseUrl,
@@ -185,7 +192,8 @@ async function start(fields, cozyParameters) {
       baseUrl,
       apiAuthKey,
       sgeLogin,
-      true
+      true,
+      accountData.data.inseeCode
     )
 
     if (!userConsent) {
@@ -209,13 +217,15 @@ async function start(fields, cozyParameters) {
         contractId,
         pointId,
         boBaseUrl,
-        boToken
+        boToken,
+        consentEndDate < today
       )
     }
   }
   log('info', 'Successfully logged in')
 
   await gatherData(baseUrl, apiAuthKey, sgeLogin, pointId)
+  log('info', 'Konnector success')
 }
 
 /**
@@ -228,6 +238,7 @@ async function start(fields, cozyParameters) {
  * @param {number} pointId
  * @param {string} boBaseUrl
  * @param {string} boToken
+ * @param {boolean} isConsentExpired
  */
 async function deleteConsent(
   userConsent,
@@ -237,7 +248,8 @@ async function deleteConsent(
   contractId,
   pointId,
   boBaseUrl,
-  boToken
+  boToken,
+  isConsentExpired
 ) {
   log('error', `Invalid or not found consent for user`)
   if (userConsent.serviceID) {
@@ -254,6 +266,9 @@ async function deleteConsent(
     log('error', `No service id retrieved from BO`)
     throw errors.VENDOR_DOWN
   }
+  if (isConsentExpired) {
+    throw errors.USER_ACTION_NEEDED_OAUTH_OUTDATED
+  }
   throw errors.TERMS_VERSION_MISMATCH
 }
 
@@ -302,7 +317,7 @@ async function getData(url, apiAuthKey, userLogin, pointId) {
     apikey: apiAuthKey,
   }
 
-  setStartDate()
+  limitStartDate()
 
   const { response } = await soapRequest({
     url: url,
@@ -346,7 +361,7 @@ async function getMaxPowerData(url, apiAuthKey, userLogin, pointId) {
     apikey: apiAuthKey,
   }
 
-  setStartDate()
+  limitStartDate()
 
   const { response } = await soapRequest({
     url: url,
@@ -376,10 +391,16 @@ async function getMaxPowerData(url, apiAuthKey, userLogin, pointId) {
 
 /**
  * If start date exceed the maximum amount of data we can get with one query
- * get only 36 month
- */
-function setStartDate() {
-  if (moment(endDate).diff(startDailyDate, 'months', true) > 36) {
+ * get only 36 month. Or 12 month if manual execution
+ * On manual execution, set the start date to one year ago.
+ */
+function limitStartDate() {
+  const livingDuration = moment(endDate).diff(startDailyDate, 'months', true)
+  // We need to prevent case that there is less than 12 month data
+  if (manualExecution && livingDuration > 12) {
+    startDailyDate = moment(endDate).subtract(12, 'month')
+    startDailyDateString = startDailyDate.format('YYYY-MM-DD')
+  } else if (livingDuration > 36) {
     log(
       'info',
       'Start date exceed 36 month, setting start date to current date minus 36 month'
@@ -479,7 +500,7 @@ function processData(doctype = 'com.grandlyon.enedis.day') {
           `No half-hour activated. Issue: ${result.Envelope.Body.Fault.faultstring}`
         )
       } else {
-        log('error', `Unkown error ${e}`)
+        log('warn', `Unkown error ${e}`)
       }
     }
   }
@@ -148213,7 +148234,7 @@ const fs = __webpack_require__(149);
 
 const path = __webpack_require__(142);
 
-let manifest = typeof {"version":"1.0.1","name":"Enedis SGE","type":"konnector","language":"node","icon":"icon.png","slug":"enedis-sge-grandlyon","source":"https://forge.grandlyon.com/web-et-numerique/llle_project/enedis-sge-konnector.git","editor":"Cozy","vendor_link":"Link to the target website","categories":["energy"],"frequency":"daily","fields":{"firstname":{"type":"string"},"lastname":{"type":"string"},"address":{"type":"string"},"postalCode":{"type":"string"},"city":{"type":"string"},"pointId":{"type":"string"}},"data_types":[],"screenshots":[],"permissions":{"accounts":{"type":"io.cozy.accounts"},"files":{"type":"io.cozy.files"},"enedis data":{"type":"com.grandlyon.enedis.*"}},"developer":{"name":"Métropole de Lyon","url":"https://www.grandlyon.com/"},"langs":["fr"],"locales":{"fr":{"short_description":"Récupère vos donnéees de courbe de charge depuis l'API Enedis","long_description":"Ce connecteur récupère la courbe de charge électrique enregistrée par le compteur Linky","permissions":{"enedis data":{"description":"Requises pour accéder et stocker les données collectées par le compteur Linky et exposées par les API Enedis (consommations d’électricité à la demi-heure, au jour, mois et année). "},"files":{"description":"Cozy files"},"accounts":{"description":"Utilisé pour accéder à vos données de consommation."}}},"en":{"short_description":"Fetches your electricity consumption data from Enedis API","long_description":"This konnector fetches the energy curve of your electricity consumption gathered by your Linky device.","permissions":{"enedis data":{"description":"Required to access and store the data collected by the Linky meter and exposed by Enedis APIs (half-an-hour, daily, monthly and yearly consumption)."},"files":{"description":"Cozy files"},"accounts":{"description":"Used to access your consumption data."}}}},"manifest_version":"2","on_delete_account":"onDeleteAccount.js"} === 'undefined' ? {} : {"version":"1.0.1","name":"Enedis SGE","type":"konnector","language":"node","icon":"icon.png","slug":"enedis-sge-grandlyon","source":"https://forge.grandlyon.com/web-et-numerique/llle_project/enedis-sge-konnector.git","editor":"Cozy","vendor_link":"Link to the target website","categories":["energy"],"frequency":"daily","fields":{"firstname":{"type":"string"},"lastname":{"type":"string"},"address":{"type":"string"},"postalCode":{"type":"string"},"city":{"type":"string"},"pointId":{"type":"string"}},"data_types":[],"screenshots":[],"permissions":{"accounts":{"type":"io.cozy.accounts"},"files":{"type":"io.cozy.files"},"enedis data":{"type":"com.grandlyon.enedis.*"}},"developer":{"name":"Métropole de Lyon","url":"https://www.grandlyon.com/"},"langs":["fr"],"locales":{"fr":{"short_description":"Récupère vos donnéees de courbe de charge depuis l'API Enedis","long_description":"Ce connecteur récupère la courbe de charge électrique enregistrée par le compteur Linky","permissions":{"enedis data":{"description":"Requises pour accéder et stocker les données collectées par le compteur Linky et exposées par les API Enedis (consommations d’électricité à la demi-heure, au jour, mois et année). "},"files":{"description":"Cozy files"},"accounts":{"description":"Utilisé pour accéder à vos données de consommation."}}},"en":{"short_description":"Fetches your electricity consumption data from Enedis API","long_description":"This konnector fetches the energy curve of your electricity consumption gathered by your Linky device.","permissions":{"enedis data":{"description":"Required to access and store the data collected by the Linky meter and exposed by Enedis APIs (half-an-hour, daily, monthly and yearly consumption)."},"files":{"description":"Cozy files"},"accounts":{"description":"Used to access your consumption data."}}}},"manifest_version":"2","on_delete_account":"onDeleteAccount.js"};
+let manifest = typeof {"version":"1.0.1","name":"Enedis SGE","type":"konnector","language":"node","icon":"icon.png","slug":"enedissgegrandlyon","source":"https://forge.grandlyon.com/web-et-numerique/llle_project/enedis-sge-konnector.git","editor":"Cozy","vendor_link":"Link to the target website","categories":["energy"],"frequency":"daily","fields":{"firstname":{"type":"string"},"lastname":{"type":"string"},"address":{"type":"string"},"postalCode":{"type":"string"},"city":{"type":"string"},"pointId":{"type":"string"}},"data_types":[],"screenshots":[],"permissions":{"accounts":{"type":"io.cozy.accounts"},"files":{"type":"io.cozy.files"},"enedis data":{"type":"com.grandlyon.enedis.*"}},"developer":{"name":"Métropole de Lyon","url":"https://www.grandlyon.com/"},"langs":["fr"],"locales":{"fr":{"short_description":"Récupère vos donnéees de courbe de charge depuis l'API Enedis","long_description":"Ce connecteur récupère la courbe de charge électrique enregistrée par le compteur Linky","permissions":{"enedis data":{"description":"Requises pour accéder et stocker les données collectées par le compteur Linky et exposées par les API Enedis (consommations d’électricité à la demi-heure, au jour, mois et année). "},"files":{"description":"Cozy files"},"accounts":{"description":"Utilisé pour accéder à vos données de consommation."}}},"en":{"short_description":"Fetches your electricity consumption data from Enedis API","long_description":"This konnector fetches the energy curve of your electricity consumption gathered by your Linky device.","permissions":{"enedis data":{"description":"Required to access and store the data collected by the Linky meter and exposed by Enedis APIs (half-an-hour, daily, monthly and yearly consumption)."},"files":{"description":"Cozy files"},"accounts":{"description":"Used to access your consumption data."}}}},"manifest_version":"2","on_delete_account":"onDeleteAccount.js"} === 'undefined' ? {} : {"version":"1.0.1","name":"Enedis SGE","type":"konnector","language":"node","icon":"icon.png","slug":"enedissgegrandlyon","source":"https://forge.grandlyon.com/web-et-numerique/llle_project/enedis-sge-konnector.git","editor":"Cozy","vendor_link":"Link to the target website","categories":["energy"],"frequency":"daily","fields":{"firstname":{"type":"string"},"lastname":{"type":"string"},"address":{"type":"string"},"postalCode":{"type":"string"},"city":{"type":"string"},"pointId":{"type":"string"}},"data_types":[],"screenshots":[],"permissions":{"accounts":{"type":"io.cozy.accounts"},"files":{"type":"io.cozy.files"},"enedis data":{"type":"com.grandlyon.enedis.*"}},"developer":{"name":"Métropole de Lyon","url":"https://www.grandlyon.com/"},"langs":["fr"],"locales":{"fr":{"short_description":"Récupère vos donnéees de courbe de charge depuis l'API Enedis","long_description":"Ce connecteur récupère la courbe de charge électrique enregistrée par le compteur Linky","permissions":{"enedis data":{"description":"Requises pour accéder et stocker les données collectées par le compteur Linky et exposées par les API Enedis (consommations d’électricité à la demi-heure, au jour, mois et année). "},"files":{"description":"Cozy files"},"accounts":{"description":"Utilisé pour accéder à vos données de consommation."}}},"en":{"short_description":"Fetches your electricity consumption data from Enedis API","long_description":"This konnector fetches the energy curve of your electricity consumption gathered by your Linky device.","permissions":{"enedis data":{"description":"Required to access and store the data collected by the Linky meter and exposed by Enedis APIs (half-an-hour, daily, monthly and yearly consumption)."},"files":{"description":"Cozy files"},"accounts":{"description":"Used to access your consumption data."}}}},"manifest_version":"2","on_delete_account":"onDeleteAccount.js"};
 
 if (process.env.NODE_ENV !== undefined && process.env.NODE_ENV !== 'none' && process.env.NODE_ENV !== 'production') {
   try {
@@ -181041,6 +181062,7 @@ const removeFile = async function (file) {
 
 module.exports = saveFiles;
 module.exports.getFileIfExists = getFileIfExists;
+module.exports.sanitizeFileName = sanitizeFileName;
 
 function getFileName(entry) {
   let filename;
@@ -181061,7 +181083,9 @@ function getFileName(entry) {
 }
 
 function sanitizeFileName(filename) {
-  return filename.replace(/^\.+$/, '').replace(/[/?<>\\:*|":]/g, '');
+  return filename.replace(/^\.+$/, '').replace(/[/?<>\\:*|":]/g, '') // Replace ascii control characters from 00 to 0F
+  // eslint-disable-next-line no-control-regex
+  .replace(/[\x00-\x0F]/g, '');
 }
 
 function checkFileSize(fileobject) {
@@ -223517,6 +223541,18 @@ function parseContractStartDate(result) {
     'dateDerniereModificationFormuleTarifaireAcheminement'
   ]
 }
+/**
+ * Return User address
+ * @param {string} result
+ * @returns {Address}
+ */
+function parseUserAddress(result) {
+  log('info', 'Parsing user Address')
+  const json = JSON.stringify(result)
+  return JSON.parse(json)['Envelope']['Body'][
+    'consulterDonneesTechniquesContractuellesResponse'
+  ]['point']['donneesGenerales']['adresseInstallation']
+}
 
 /**
  * Return User contract start date
@@ -223615,6 +223651,24 @@ function parseValue(value, name) {
   return value
 }
 
+/**
+ * Remove SGE useless multiple white spaces
+ * @param {string} str
+ * @returns {string}
+ */
+function removeMultipleSpaces(str) {
+  return str.replace(/  +/g, ' ')
+}
+
+/**
+ * Remove SGE address number
+ * @param {string} str
+ * @returns {string}
+ */
+function removeAddressnumber(str) {
+  return str.replace(/\d+ |b |B |T |t |\d+/g, '')
+}
+
 module.exports = {
   parseSgeXmlData,
   formateDataForDoctype,
@@ -223624,7 +223678,10 @@ module.exports = {
   parseContracts,
   parseContractStartDate,
   parseServiceId,
+  parseUserAddress,
   checkContractExists,
+  removeMultipleSpaces,
+  removeAddressnumber,
 }
 
 
@@ -223736,7 +223793,11 @@ function consultationMesuresDetailleesMaxPower(
  * @param {string} appLogin
  * @returns {string}
  */
-function consulterDonneesTechniquesContractuelles(pointId, appLogin) {
+function consulterDonneesTechniquesContractuelles(
+  pointId,
+  appLogin,
+  consent = true
+) {
   log('info', `Query consulterDonneesTechniquesContractuelles`)
   return `<?xml version='1.0' encoding='utf-8'?>
   <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
@@ -223747,7 +223808,7 @@ function consulterDonneesTechniquesContractuelles(pointId, appLogin) {
         <v2:consulterDonneesTechniquesContractuelles>
            <pointId>${pointId}</pointId>
            <loginUtilisateur>${appLogin}</loginUtilisateur>
-           <autorisationClient>true</autorisationClient>
+           <autorisationClient>${consent}</autorisationClient>
         </v2:consulterDonneesTechniquesContractuelles>
      </soapenv:Body>
   </soapenv:Envelope>
@@ -223759,14 +223820,45 @@ function consulterDonneesTechniquesContractuelles(pointId, appLogin) {
  * @param {string} name
  * @param {string} postalCode
  * @param {string} inseeCode
- * @param {string} [address]
+ * @param {string} address
+ * @param {string} [escalierEtEtageEtAppartement]
  * @returns {string} PDL
  */
-function rechercherPoint(appLogin, name, postalCode, inseeCode, address) {
+function rechercherPoint(
+  appLogin,
+  name,
+  postalCode,
+  inseeCode,
+  address,
+  escalierEtEtageEtAppartement
+) {
   log(
     'info',
-    `Query rechercherPoint - postal code / insee code: ${postalCode} / ${inseeCode}`
+    `Query rechercherPoint - postal code : ${postalCode} / insee code: ${inseeCode}`
   )
+  if (escalierEtEtageEtAppartement) {
+    return `<?xml version='1.0' encoding='utf-8'?>
+    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
+       xmlns:v2="http://www.enedis.fr/sge/b2b/services/rechercherpoint/v2.0"
+       xmlns:v1="http://www.enedis.fr/sge/b2b/technique/v1.0">
+       <soapenv:Header/>
+       <soapenv:Body>
+          <v2:rechercherPoint>
+             <criteres>
+                <adresseInstallation>
+                   <escalierEtEtageEtAppartement>${escalierEtEtageEtAppartement}</escalierEtEtageEtAppartement>
+                   <numeroEtNomVoie>${address}</numeroEtNomVoie>
+                   <codePostal>${postalCode}</codePostal>
+                   <codeInseeCommune>${inseeCode}</codeInseeCommune>
+                </adresseInstallation>
+                <nomClientFinalOuDenominationSociale>${name}</nomClientFinalOuDenominationSociale>
+                <rechercheHorsPerimetre>true</rechercheHorsPerimetre>
+             </criteres>
+             <loginUtilisateur>${appLogin}</loginUtilisateur>
+          </v2:rechercherPoint>
+       </soapenv:Body>
+    </soapenv:Envelope>`
+  }
   return `<?xml version='1.0' encoding='utf-8'?>
   <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
      xmlns:v2="http://www.enedis.fr/sge/b2b/services/rechercherpoint/v2.0"
@@ -223865,7 +223957,7 @@ function commanderCollectePublicationMesures(
                       <injection>false</injection>
                       <mesuresPas>PT30M</mesuresPas>
                       <mesuresCorrigees>false</mesuresCorrigees>
-                      <transmissionRecurrente>true</transmissionRecurrente>
+                      <transmissionRecurrente>false</transmissionRecurrente>
                       <periodiciteTransmission>P1D</periodiciteTransmission>
                   </accesMesures>
               </demande>
@@ -223941,6 +224033,8 @@ const { default: axios } = __webpack_require__(1558)
  * @param {string} address
  * @param {string} postalCode
  * @param {string} inseeCode
+ * @param {string} city
+ * @param {boolean} safetyOnBoarding
  * @returns {Promise<Consent>}
  */
 async function createBoConsent(
@@ -223951,7 +224045,9 @@ async function createBoConsent(
   firstname,
   address,
   postalCode,
-  inseeCode
+  inseeCode,
+  city,
+  safetyOnBoarding
 ) {
   log('info', `Query createBoConsent`)
   const headers = {
@@ -223970,6 +224066,8 @@ async function createBoConsent(
         address,
         postalCode,
         inseeCode,
+        city,
+        safetyOnBoarding,
       },
       headers
     )
@@ -227988,6 +228086,7 @@ const { terminateContract } = __webpack_require__(1598)
 const { verifyContract } = __webpack_require__(1599)
 const { findUserPdl } = __webpack_require__(1601)
 const { verifyUserIdentity } = __webpack_require__(1602)
+const { findUserAddress } = __webpack_require__(1604)
 
 module.exports = {
   activateContract,
@@ -227996,6 +228095,7 @@ module.exports = {
   verifyContract,
   findUserPdl,
   verifyUserIdentity,
+  findUserAddress,
 }
 
 
@@ -228063,10 +228163,12 @@ async function activateContract(
     return parseServiceId(parsedReply)
   } catch (error) {
     log('error', 'Error while activating contract: ' + error)
-    log(
-      'error',
-      `Enedis issue ${parsedReply.Envelope.Body.Fault.detail.erreur.resultat.$.code}: ${parsedReply.Envelope.Body.Fault.faultstring}`
-    )
+    if (parsedReply.Envelope.Body.Fault) {
+      log(
+        'error',
+        `Enedis issue ${parsedReply.Envelope.Body.Fault.detail.erreur.resultat.$.code}: ${parsedReply.Envelope.Body.Fault.faultstring}`
+      )
+    }
     //TODO: handle SGT4B8: Il existe déjà plusieurs demandes en cours sur le point ?
     throw errors.LOGIN_FAILED
   }
@@ -228265,7 +228367,7 @@ async function verifyContract(url, apiAuthKey, appLogin, contractId, pointId) {
     if (Array.isArray(currentContracts)) {
       currentContract = parseContracts(parsedReply)[0]
     } else {
-      currentContract = parseContracts(parsedReply)
+      currentContract = currentContracts
     }
     if (
       (currentContract.etatCode === contractState.ACTIF ||
@@ -228276,10 +228378,12 @@ async function verifyContract(url, apiAuthKey, appLogin, contractId, pointId) {
     return null
   } catch (error) {
     log('error', 'Error while parsing user contract: ' + error)
-    log(
-      'error',
-      `Enedis issue ${parsedReply.Envelope.Body.Fault.detail.erreur.resultat.$.code}: ${parsedReply.Envelope.Body.Fault.faultstring}`
-    )
+    if (parsedReply.Envelope.Body.Fault) {
+      log(
+        'error',
+        `Enedis issue ${parsedReply.Envelope.Body.Fault.detail.erreur.resultat.$.code}: ${parsedReply.Envelope.Body.Fault.faultstring}`
+      )
+    }
     throw errors.LOGIN_FAILED
   }
 }
@@ -228343,9 +228447,10 @@ async function findUserPdl(
   name,
   address,
   postalCode,
-  inseeCode
+  inseeCode,
+  escalierEtEtageEtAppartement = ''
 ) {
-  log('info', 'Fetching user data')
+  log('info', 'Fetching user pdl')
   const sgeHeaders = {
     'Content-Type': 'text/xml;charset=UTF-8',
     apikey: apiAuthKey,
@@ -228354,7 +228459,14 @@ async function findUserPdl(
   const { response } = await soapRequest({
     url: url,
     headers: sgeHeaders,
-    xml: rechercherPoint(appLogin, name, postalCode, inseeCode, address),
+    xml: rechercherPoint(
+      appLogin,
+      name,
+      postalCode,
+      inseeCode,
+      address,
+      escalierEtEtageEtAppartement
+    ),
   }).catch(err => {
     log('error', 'rechercherPointResponse')
     log('error', err)
@@ -228370,12 +228482,14 @@ async function findUserPdl(
   try {
     return parseUserPdl(parsedReply)
   } catch (error) {
-    log('error', 'Error while parsing user PDL: ' + error)
-    log(
-      'error',
-      `Enedis issue ${parsedReply.Envelope.Body.Fault.detail.erreur.resultat.$.code}: ${parsedReply.Envelope.Body.Fault.faultstring}`
-    )
-    throw errors.LOGIN_FAILED
+    log('warn', 'Error while parsing user PDL: ' + error)
+    if (parsedReply.Envelope.Body.Fault) {
+      log(
+        'warn',
+        `Enedis issue ${parsedReply.Envelope.Body.Fault.detail.erreur.resultat.$.code}: ${parsedReply.Envelope.Body.Fault.faultstring}`
+      )
+    }
+    return null
   }
 }
 
@@ -228390,6 +228504,11 @@ module.exports = { findUserPdl }
 const { log, errors } = __webpack_require__(1)
 const { findUserPdl } = __webpack_require__(1601)
 const { getInseeCode } = __webpack_require__(1603)
+const { findUserAddress } = __webpack_require__(1604)
+const {
+  removeMultipleSpaces,
+  removeAddressnumber,
+} = __webpack_require__(1555)
 
 /**
  * Verify user identity
@@ -228405,11 +228524,20 @@ async function verifyUserIdentity(
   baseUrl,
   apiAuthKey,
   loginUtilisateur,
-  isAlternateStart = false
+  isAlternateStart = false,
+  inseeCode = ''
 ) {
-  const inseeCode = await getInseeCode(fields.postalCode, fields.city)
+  // If first start get InseeCode
+  log('debug', 'verifyUserIdentity')
+  if (!isAlternateStart) {
+    inseeCode = await getInseeCode(fields.postalCode, fields.city)
+  }
 
-  const pdl = await findUserPdl(
+  // Store if user is going through safety sge onboarding
+  let userSafetyOnBoarding = false
+
+  // First try with user adresse
+  let pdl = await findUserPdl(
     `${baseUrl}/enedis_SDE_recherche-point/1.0`,
     apiAuthKey,
     loginUtilisateur,
@@ -228419,8 +228547,65 @@ async function verifyUserIdentity(
     inseeCode
   )
 
+  if (!pdl) {
+    log('warn', 'Second chance for sge onboarding')
+    // Set safety onboarding in order to save it inside BO
+    userSafetyOnBoarding = true
+    // Backup verification
+    const userAddress = await findUserAddress(
+      baseUrl,
+      apiAuthKey,
+      loginUtilisateur,
+      fields.pointId
+    )
+
+    const escalierEtEtageEtAppartement = userAddress.escalierEtEtageEtAppartement
+      ? removeMultipleSpaces(userAddress.escalierEtEtageEtAppartement)
+      : ''
+
+    pdl = await findUserPdl(
+      `${baseUrl}/enedis_SDE_recherche-point/1.0`,
+      apiAuthKey,
+      loginUtilisateur,
+      fields.lastname,
+      removeMultipleSpaces(userAddress.numeroEtNomVoie),
+      userAddress.codePostal,
+      userAddress.commune.$.code,
+      escalierEtEtageEtAppartement
+    )
+
+    // Third try, remove address number because it's buggy on SGE side
+    if (!pdl) {
+      log('warn', 'Third chance onboarding for sge')
+      pdl = await findUserPdl(
+        `${baseUrl}/enedis_SDE_recherche-point/1.0`,
+        apiAuthKey,
+        loginUtilisateur,
+        fields.lastname,
+        removeMultipleSpaces(removeAddressnumber(userAddress.numeroEtNomVoie)),
+        userAddress.codePostal,
+        userAddress.commune.$.code
+      )
+    }
+    // Third try, remove address number and add escalierEtEtageEtAppartement because it's buggy on SGE side
+    if (!pdl) {
+      log('warn', 'Last chance onboarding for sge')
+      pdl = await findUserPdl(
+        `${baseUrl}/enedis_SDE_recherche-point/1.0`,
+        apiAuthKey,
+        loginUtilisateur,
+        fields.lastname,
+        removeMultipleSpaces(removeAddressnumber(userAddress.numeroEtNomVoie)),
+        userAddress.codePostal,
+        userAddress.commune.$.code,
+        escalierEtEtageEtAppartement
+      )
+    }
+  }
+
   if (fields.pointId != pdl) {
     log('error', 'PointId does not match')
+
     if (isAlternateStart) {
       throw errors.TERMS_VERSION_MISMATCH
     } else {
@@ -228435,6 +228620,8 @@ async function verifyUserIdentity(
     inseeCode,
     postalCode: fields.postalCode,
     address: fields.address,
+    hasBeenThroughtSafetyOnBoarding: userSafetyOnBoarding,
+    city: fields.city,
   }
 }
 
@@ -228490,8 +228677,68 @@ module.exports = {
 /* 1604 */
 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
 
+// @ts-check
+const { log, errors } = __webpack_require__(1)
+const soapRequest = __webpack_require__(1331)
+const {
+  parseTags,
+  parseValue,
+  parseUserAddress,
+} = __webpack_require__(1555)
+const xml2js = __webpack_require__(1513)
+const { consulterDonneesTechniquesContractuelles } = __webpack_require__(1556)
+
+/**
+ * Get user contract start date
+ * @param {string} url
+ * @param {string} apiAuthKey
+ * @param {string} userLogin
+ * @param {number} pointId
+ * @returns {Promise<Address>}
+ */
+async function findUserAddress(url, apiAuthKey, userLogin, pointId) {
+  log('info', 'Fetching user address')
+  const sgeHeaders = {
+    'Content-Type': 'text/xml;charset=UTF-8',
+    apikey: apiAuthKey,
+  }
+
+  const { response } = await soapRequest({
+    url: `${url}/enedis_SGE_ConsultationDonneesTechniquesContractuelles/1.0`,
+    headers: sgeHeaders,
+    xml: consulterDonneesTechniquesContractuelles(pointId, userLogin, false),
+  }).catch(err => {
+    log('error', 'Error while fetching user : ' + err)
+    throw errors.VENDOR_DOWN
+  })
+
+  const result = await xml2js.parseStringPromise(response.body, {
+    tagNameProcessors: [parseTags],
+    valueProcessors: [parseValue],
+    explicitArray: false,
+  })
+
+  try {
+    return parseUserAddress(result)
+  } catch (error) {
+    log('error', 'Error while processing user address: ' + error)
+    log(
+      'error',
+      `Enedis issue ${result.Envelope.Body.Fault.detail.erreur.resultat.$.code}: ${result.Envelope.Body.Fault.faultstring}`
+    )
+    throw errors.NOT_EXISTING_DIRECTORY
+  }
+}
+
+module.exports = { findUserAddress }
+
+
+/***/ }),
+/* 1605 */
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
+
 const { log, updateOrCreate } = __webpack_require__(1)
-const { isLocal } = __webpack_require__(1605)
+const { isLocal } = __webpack_require__(1606)
 const cozyClient = __webpack_require__(485)
 
 async function saveAccountData(accountId, accountData) {
@@ -228506,6 +228753,11 @@ async function saveAccountData(accountId, accountData) {
   return account
 }
 
+/**
+ * Return account
+ * @param {string} accountId
+ * @returns {Account}
+ */
 async function getAccount(accountId) {
   log('info', `getAccount: ${accountId}`)
   const accounts = await cozyClient.data.findAll('io.cozy.accounts')
@@ -228514,11 +228766,22 @@ async function getAccount(accountId) {
   )[0]
 }
 
-module.exports = { getAccount, saveAccountData }
+async function getAccountForDelete(accountId, accountRev) {
+  log('info', `getAccountForDelete: ${accountId} ${accountRev}`)
+  const body = await cozyClient.fetchJSON(
+    'GET',
+    `/data/io.cozy.accounts/${accountId}?rev=${accountRev}`
+  )
+
+  log('debug', `getAccountForDelete: ${body}`)
+  return body
+}
+
+module.exports = { getAccount, saveAccountData, getAccountForDelete }
 
 
 /***/ }),
-/* 1605 */
+/* 1606 */
 /***/ ((module) => {
 
 function isLocal() {
@@ -228529,7 +228792,18 @@ function isLocal() {
   )
 }
 
-module.exports = { isLocal }
+/**
+ * Verify if it's an alpha URL
+ * @returns {boolean}
+ */
+function isDev() {
+  return (
+    process.env.COZY_URL.includes('alpha') ||
+    process.env.COZY_URL.includes('cozy.tools')
+  )
+}
+
+module.exports = { isLocal, isDev }
 
 
 /***/ })
diff --git a/manifest.konnector b/manifest.konnector
index 9f38cbaea11eb65707d7eaf3090e85286b8bab35..db858bdcccc3b15baae991bd69a32226fca05dc3 100644
--- a/manifest.konnector
+++ b/manifest.konnector
@@ -4,7 +4,7 @@
   "type": "konnector",
   "language": "node",
   "icon": "icon.png",
-  "slug": "enedis-sge-grandlyon",
+  "slug": "enedissgegrandlyon",
   "source": "https://forge.grandlyon.com/web-et-numerique/llle_project/enedis-sge-konnector.git",
   "editor": "Cozy",
   "vendor_link": "Link to the target website",
diff --git a/onDeleteAccount.js b/onDeleteAccount.js
index f8992eba4334e6db2cbf2ee3f446cab12f106daf..83e19387ca3e0c6415e00687da56e580fff45eb7 100644
--- a/onDeleteAccount.js
+++ b/onDeleteAccount.js
@@ -147665,7 +147665,7 @@ const fs = __webpack_require__(149);
 
 const path = __webpack_require__(142);
 
-let manifest = typeof {"version":"1.0.1","name":"Enedis SGE","type":"konnector","language":"node","icon":"icon.png","slug":"enedis-sge-grandlyon","source":"https://forge.grandlyon.com/web-et-numerique/llle_project/enedis-sge-konnector.git","editor":"Cozy","vendor_link":"Link to the target website","categories":["energy"],"frequency":"daily","fields":{"firstname":{"type":"string"},"lastname":{"type":"string"},"address":{"type":"string"},"postalCode":{"type":"string"},"city":{"type":"string"},"pointId":{"type":"string"}},"data_types":[],"screenshots":[],"permissions":{"accounts":{"type":"io.cozy.accounts"},"files":{"type":"io.cozy.files"},"enedis data":{"type":"com.grandlyon.enedis.*"}},"developer":{"name":"Métropole de Lyon","url":"https://www.grandlyon.com/"},"langs":["fr"],"locales":{"fr":{"short_description":"Récupère vos donnéees de courbe de charge depuis l'API Enedis","long_description":"Ce connecteur récupère la courbe de charge électrique enregistrée par le compteur Linky","permissions":{"enedis data":{"description":"Requises pour accéder et stocker les données collectées par le compteur Linky et exposées par les API Enedis (consommations d’électricité à la demi-heure, au jour, mois et année). "},"files":{"description":"Cozy files"},"accounts":{"description":"Utilisé pour accéder à vos données de consommation."}}},"en":{"short_description":"Fetches your electricity consumption data from Enedis API","long_description":"This konnector fetches the energy curve of your electricity consumption gathered by your Linky device.","permissions":{"enedis data":{"description":"Required to access and store the data collected by the Linky meter and exposed by Enedis APIs (half-an-hour, daily, monthly and yearly consumption)."},"files":{"description":"Cozy files"},"accounts":{"description":"Used to access your consumption data."}}}},"manifest_version":"2","on_delete_account":"onDeleteAccount.js"} === 'undefined' ? {} : {"version":"1.0.1","name":"Enedis SGE","type":"konnector","language":"node","icon":"icon.png","slug":"enedis-sge-grandlyon","source":"https://forge.grandlyon.com/web-et-numerique/llle_project/enedis-sge-konnector.git","editor":"Cozy","vendor_link":"Link to the target website","categories":["energy"],"frequency":"daily","fields":{"firstname":{"type":"string"},"lastname":{"type":"string"},"address":{"type":"string"},"postalCode":{"type":"string"},"city":{"type":"string"},"pointId":{"type":"string"}},"data_types":[],"screenshots":[],"permissions":{"accounts":{"type":"io.cozy.accounts"},"files":{"type":"io.cozy.files"},"enedis data":{"type":"com.grandlyon.enedis.*"}},"developer":{"name":"Métropole de Lyon","url":"https://www.grandlyon.com/"},"langs":["fr"],"locales":{"fr":{"short_description":"Récupère vos donnéees de courbe de charge depuis l'API Enedis","long_description":"Ce connecteur récupère la courbe de charge électrique enregistrée par le compteur Linky","permissions":{"enedis data":{"description":"Requises pour accéder et stocker les données collectées par le compteur Linky et exposées par les API Enedis (consommations d’électricité à la demi-heure, au jour, mois et année). "},"files":{"description":"Cozy files"},"accounts":{"description":"Utilisé pour accéder à vos données de consommation."}}},"en":{"short_description":"Fetches your electricity consumption data from Enedis API","long_description":"This konnector fetches the energy curve of your electricity consumption gathered by your Linky device.","permissions":{"enedis data":{"description":"Required to access and store the data collected by the Linky meter and exposed by Enedis APIs (half-an-hour, daily, monthly and yearly consumption)."},"files":{"description":"Cozy files"},"accounts":{"description":"Used to access your consumption data."}}}},"manifest_version":"2","on_delete_account":"onDeleteAccount.js"};
+let manifest = typeof {"version":"1.0.1","name":"Enedis SGE","type":"konnector","language":"node","icon":"icon.png","slug":"enedissgegrandlyon","source":"https://forge.grandlyon.com/web-et-numerique/llle_project/enedis-sge-konnector.git","editor":"Cozy","vendor_link":"Link to the target website","categories":["energy"],"frequency":"daily","fields":{"firstname":{"type":"string"},"lastname":{"type":"string"},"address":{"type":"string"},"postalCode":{"type":"string"},"city":{"type":"string"},"pointId":{"type":"string"}},"data_types":[],"screenshots":[],"permissions":{"accounts":{"type":"io.cozy.accounts"},"files":{"type":"io.cozy.files"},"enedis data":{"type":"com.grandlyon.enedis.*"}},"developer":{"name":"Métropole de Lyon","url":"https://www.grandlyon.com/"},"langs":["fr"],"locales":{"fr":{"short_description":"Récupère vos donnéees de courbe de charge depuis l'API Enedis","long_description":"Ce connecteur récupère la courbe de charge électrique enregistrée par le compteur Linky","permissions":{"enedis data":{"description":"Requises pour accéder et stocker les données collectées par le compteur Linky et exposées par les API Enedis (consommations d’électricité à la demi-heure, au jour, mois et année). "},"files":{"description":"Cozy files"},"accounts":{"description":"Utilisé pour accéder à vos données de consommation."}}},"en":{"short_description":"Fetches your electricity consumption data from Enedis API","long_description":"This konnector fetches the energy curve of your electricity consumption gathered by your Linky device.","permissions":{"enedis data":{"description":"Required to access and store the data collected by the Linky meter and exposed by Enedis APIs (half-an-hour, daily, monthly and yearly consumption)."},"files":{"description":"Cozy files"},"accounts":{"description":"Used to access your consumption data."}}}},"manifest_version":"2","on_delete_account":"onDeleteAccount.js"} === 'undefined' ? {} : {"version":"1.0.1","name":"Enedis SGE","type":"konnector","language":"node","icon":"icon.png","slug":"enedissgegrandlyon","source":"https://forge.grandlyon.com/web-et-numerique/llle_project/enedis-sge-konnector.git","editor":"Cozy","vendor_link":"Link to the target website","categories":["energy"],"frequency":"daily","fields":{"firstname":{"type":"string"},"lastname":{"type":"string"},"address":{"type":"string"},"postalCode":{"type":"string"},"city":{"type":"string"},"pointId":{"type":"string"}},"data_types":[],"screenshots":[],"permissions":{"accounts":{"type":"io.cozy.accounts"},"files":{"type":"io.cozy.files"},"enedis data":{"type":"com.grandlyon.enedis.*"}},"developer":{"name":"Métropole de Lyon","url":"https://www.grandlyon.com/"},"langs":["fr"],"locales":{"fr":{"short_description":"Récupère vos donnéees de courbe de charge depuis l'API Enedis","long_description":"Ce connecteur récupère la courbe de charge électrique enregistrée par le compteur Linky","permissions":{"enedis data":{"description":"Requises pour accéder et stocker les données collectées par le compteur Linky et exposées par les API Enedis (consommations d’électricité à la demi-heure, au jour, mois et année). "},"files":{"description":"Cozy files"},"accounts":{"description":"Utilisé pour accéder à vos données de consommation."}}},"en":{"short_description":"Fetches your electricity consumption data from Enedis API","long_description":"This konnector fetches the energy curve of your electricity consumption gathered by your Linky device.","permissions":{"enedis data":{"description":"Required to access and store the data collected by the Linky meter and exposed by Enedis APIs (half-an-hour, daily, monthly and yearly consumption)."},"files":{"description":"Cozy files"},"accounts":{"description":"Used to access your consumption data."}}}},"manifest_version":"2","on_delete_account":"onDeleteAccount.js"};
 
 if (process.env.NODE_ENV !== undefined && process.env.NODE_ENV !== 'none' && process.env.NODE_ENV !== 'production') {
   try {
@@ -180493,6 +180493,7 @@ const removeFile = async function (file) {
 
 module.exports = saveFiles;
 module.exports.getFileIfExists = getFileIfExists;
+module.exports.sanitizeFileName = sanitizeFileName;
 
 function getFileName(entry) {
   let filename;
@@ -180513,7 +180514,9 @@ function getFileName(entry) {
 }
 
 function sanitizeFileName(filename) {
-  return filename.replace(/^\.+$/, '').replace(/[/?<>\\:*|":]/g, '');
+  return filename.replace(/^\.+$/, '').replace(/[/?<>\\:*|":]/g, '') // Replace ascii control characters from 00 to 0F
+  // eslint-disable-next-line no-control-regex
+  .replace(/[\x00-\x0F]/g, '');
 }
 
 function checkFileSize(fileobject) {
@@ -222858,6 +222861,18 @@ function parseContractStartDate(result) {
     'dateDerniereModificationFormuleTarifaireAcheminement'
   ]
 }
+/**
+ * Return User address
+ * @param {string} result
+ * @returns {Address}
+ */
+function parseUserAddress(result) {
+  log('info', 'Parsing user Address')
+  const json = JSON.stringify(result)
+  return JSON.parse(json)['Envelope']['Body'][
+    'consulterDonneesTechniquesContractuellesResponse'
+  ]['point']['donneesGenerales']['adresseInstallation']
+}
 
 /**
  * Return User contract start date
@@ -222956,6 +222971,24 @@ function parseValue(value, name) {
   return value
 }
 
+/**
+ * Remove SGE useless multiple white spaces
+ * @param {string} str
+ * @returns {string}
+ */
+function removeMultipleSpaces(str) {
+  return str.replace(/  +/g, ' ')
+}
+
+/**
+ * Remove SGE address number
+ * @param {string} str
+ * @returns {string}
+ */
+function removeAddressnumber(str) {
+  return str.replace(/\d+ |b |B |T |t |\d+/g, '')
+}
+
 module.exports = {
   parseSgeXmlData,
   formateDataForDoctype,
@@ -222965,7 +222998,10 @@ module.exports = {
   parseContracts,
   parseContractStartDate,
   parseServiceId,
+  parseUserAddress,
   checkContractExists,
+  removeMultipleSpaces,
+  removeAddressnumber,
 }
 
 
@@ -223077,7 +223113,11 @@ function consultationMesuresDetailleesMaxPower(
  * @param {string} appLogin
  * @returns {string}
  */
-function consulterDonneesTechniquesContractuelles(pointId, appLogin) {
+function consulterDonneesTechniquesContractuelles(
+  pointId,
+  appLogin,
+  consent = true
+) {
   log('info', `Query consulterDonneesTechniquesContractuelles`)
   return `<?xml version='1.0' encoding='utf-8'?>
   <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
@@ -223088,7 +223128,7 @@ function consulterDonneesTechniquesContractuelles(pointId, appLogin) {
         <v2:consulterDonneesTechniquesContractuelles>
            <pointId>${pointId}</pointId>
            <loginUtilisateur>${appLogin}</loginUtilisateur>
-           <autorisationClient>true</autorisationClient>
+           <autorisationClient>${consent}</autorisationClient>
         </v2:consulterDonneesTechniquesContractuelles>
      </soapenv:Body>
   </soapenv:Envelope>
@@ -223100,14 +223140,45 @@ function consulterDonneesTechniquesContractuelles(pointId, appLogin) {
  * @param {string} name
  * @param {string} postalCode
  * @param {string} inseeCode
- * @param {string} [address]
+ * @param {string} address
+ * @param {string} [escalierEtEtageEtAppartement]
  * @returns {string} PDL
  */
-function rechercherPoint(appLogin, name, postalCode, inseeCode, address) {
+function rechercherPoint(
+  appLogin,
+  name,
+  postalCode,
+  inseeCode,
+  address,
+  escalierEtEtageEtAppartement
+) {
   log(
     'info',
-    `Query rechercherPoint - postal code / insee code: ${postalCode} / ${inseeCode}`
+    `Query rechercherPoint - postal code : ${postalCode} / insee code: ${inseeCode}`
   )
+  if (escalierEtEtageEtAppartement) {
+    return `<?xml version='1.0' encoding='utf-8'?>
+    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
+       xmlns:v2="http://www.enedis.fr/sge/b2b/services/rechercherpoint/v2.0"
+       xmlns:v1="http://www.enedis.fr/sge/b2b/technique/v1.0">
+       <soapenv:Header/>
+       <soapenv:Body>
+          <v2:rechercherPoint>
+             <criteres>
+                <adresseInstallation>
+                   <escalierEtEtageEtAppartement>${escalierEtEtageEtAppartement}</escalierEtEtageEtAppartement>
+                   <numeroEtNomVoie>${address}</numeroEtNomVoie>
+                   <codePostal>${postalCode}</codePostal>
+                   <codeInseeCommune>${inseeCode}</codeInseeCommune>
+                </adresseInstallation>
+                <nomClientFinalOuDenominationSociale>${name}</nomClientFinalOuDenominationSociale>
+                <rechercheHorsPerimetre>true</rechercheHorsPerimetre>
+             </criteres>
+             <loginUtilisateur>${appLogin}</loginUtilisateur>
+          </v2:rechercherPoint>
+       </soapenv:Body>
+    </soapenv:Envelope>`
+  }
   return `<?xml version='1.0' encoding='utf-8'?>
   <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
      xmlns:v2="http://www.enedis.fr/sge/b2b/services/rechercherpoint/v2.0"
@@ -223206,7 +223277,7 @@ function commanderCollectePublicationMesures(
                       <injection>false</injection>
                       <mesuresPas>PT30M</mesuresPas>
                       <mesuresCorrigees>false</mesuresCorrigees>
-                      <transmissionRecurrente>true</transmissionRecurrente>
+                      <transmissionRecurrente>false</transmissionRecurrente>
                       <periodiciteTransmission>P1D</periodiciteTransmission>
                   </accesMesures>
               </demande>
@@ -223282,6 +223353,8 @@ const { default: axios } = __webpack_require__(1558)
  * @param {string} address
  * @param {string} postalCode
  * @param {string} inseeCode
+ * @param {string} city
+ * @param {boolean} safetyOnBoarding
  * @returns {Promise<Consent>}
  */
 async function createBoConsent(
@@ -223292,7 +223365,9 @@ async function createBoConsent(
   firstname,
   address,
   postalCode,
-  inseeCode
+  inseeCode,
+  city,
+  safetyOnBoarding
 ) {
   log('info', `Query createBoConsent`)
   const headers = {
@@ -223311,6 +223386,8 @@ async function createBoConsent(
         address,
         postalCode,
         inseeCode,
+        city,
+        safetyOnBoarding,
       },
       headers
     )
@@ -227401,11 +227478,12 @@ module.exports = { terminateContract }
 /* 1601 */,
 /* 1602 */,
 /* 1603 */,
-/* 1604 */
+/* 1604 */,
+/* 1605 */
 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
 
 const { log, updateOrCreate } = __webpack_require__(1)
-const { isLocal } = __webpack_require__(1605)
+const { isLocal } = __webpack_require__(1606)
 const cozyClient = __webpack_require__(485)
 
 async function saveAccountData(accountId, accountData) {
@@ -227420,6 +227498,11 @@ async function saveAccountData(accountId, accountData) {
   return account
 }
 
+/**
+ * Return account
+ * @param {string} accountId
+ * @returns {Account}
+ */
 async function getAccount(accountId) {
   log('info', `getAccount: ${accountId}`)
   const accounts = await cozyClient.data.findAll('io.cozy.accounts')
@@ -227428,11 +227511,22 @@ async function getAccount(accountId) {
   )[0]
 }
 
-module.exports = { getAccount, saveAccountData }
+async function getAccountForDelete(accountId, accountRev) {
+  log('info', `getAccountForDelete: ${accountId} ${accountRev}`)
+  const body = await cozyClient.fetchJSON(
+    'GET',
+    `/data/io.cozy.accounts/${accountId}?rev=${accountRev}`
+  )
+
+  log('debug', `getAccountForDelete: ${body}`)
+  return body
+}
+
+module.exports = { getAccount, saveAccountData, getAccountForDelete }
 
 
 /***/ }),
-/* 1605 */
+/* 1606 */
 /***/ ((module) => {
 
 function isLocal() {
@@ -227443,41 +227537,70 @@ function isLocal() {
   )
 }
 
-module.exports = { isLocal }
+/**
+ * Verify if it's an alpha URL
+ * @returns {boolean}
+ */
+function isDev() {
+  return (
+    process.env.COZY_URL.includes('alpha') ||
+    process.env.COZY_URL.includes('cozy.tools')
+  )
+}
+
+module.exports = { isLocal, isDev }
 
 
 /***/ }),
-/* 1606 */
+/* 1607 */
 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
 
 // @ts-check
 const { log, errors } = __webpack_require__(1)
-const { getAccountRev, getAccountSecret } = __webpack_require__(1607)
+const {
+  getAccountRev,
+  getAccountSecret,
+  getAccountId,
+} = __webpack_require__(1608)
 const { getBoConsent, deleteBoConsent } = __webpack_require__(1557)
 const { terminateContract } = __webpack_require__(1598)
-const { getAccount } = __webpack_require__(1604)
+const { getAccountForDelete } = __webpack_require__(1605)
 const moment = __webpack_require__(1373)
 __webpack_require__(1510)
 moment.locale('fr') // set the language
 moment.tz.setDefault('Europe/Paris') // set the timezone
-const { isLocal } = __webpack_require__(1605)
-const ACCOUNT_ID = isLocal() ? 'default_account_id' : 'enedis-sge-grandlyon'
+const { isLocal, isDev } = __webpack_require__(1606)
 
 async function onDeleteAccount() {
   log('info', 'Deleting account ...')
   log('info', 'Getting secrets ...')
-  const secrets = getAccountSecret()
+  const ACCOUNT_ID = getAccountId()
   const accountRev = getAccountRev()
 
   if (accountRev) {
     log('info', 'Account rev exist')
-    const accountData = await getAccount(ACCOUNT_ID)
+    const accountData = await getAccountForDelete(ACCOUNT_ID, accountRev)
+    // Parse local info for deletion test
+    if (isLocal()) {
+      log('warn', 'Local run')
+      const fields = JSON.parse(
+        process.env.COZY_FIELDS ? process.env.COZY_FIELDS : '{}'
+      )
+      process.env.COZY_FIELDS = JSON.stringify({
+        ...fields,
+        ...accountData.auth,
+      })
+    }
+    const secrets = getAccountSecret()
+
     const userConsent = await getBoConsent(
       secrets.boBaseUrl,
       secrets.boToken,
       accountData.data.consentId
     )
 
+    log('info', `isAlpha: ${isDev()}`)
+    log('info', `userConsent: ${JSON.stringify(userConsent)}`)
     if (userConsent.ID && userConsent.pointID) {
       log('log', `Consent ${userConsent.ID} found for user`)
       if (userConsent.serviceID) {
@@ -227486,14 +227609,17 @@ async function onDeleteAccount() {
           secrets.boToken,
           userConsent.ID
         )
-        await terminateContract(
-          secrets.baseUrl,
-          secrets.apiAuthKey,
-          secrets.sgeLogin,
-          secrets.contractId,
-          userConsent.pointID,
-          userConsent.serviceID
-        )
+        // Verify if it's dev env to prevent delete of real data
+        if (!isDev()) {
+          await terminateContract(
+            secrets.wso2BaseUrl,
+            secrets.apiToken,
+            secrets.sgeLogin,
+            secrets.contractId,
+            userConsent.pointID,
+            userConsent.serviceID
+          )
+        }
       } else {
         log('error', `No service id retrieved from BO`)
         throw errors.VENDOR_DOWN
@@ -227527,11 +227653,11 @@ module.exports = { onDeleteAccount }
 
 
 /***/ }),
-/* 1607 */
+/* 1608 */
 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
 
 const { log } = __webpack_require__(1)
-const { isLocal } = __webpack_require__(1605)
+const { isLocal } = __webpack_require__(1606)
 
 function getAccountId() {
   log('info', `getAccountId`)
@@ -227544,6 +227670,7 @@ function getAccountId() {
 
 function getAccountRev() {
   log('info', `getAccountRev`)
+  log('info', `getAccountRev: ${JSON.stringify(process.env.COZY_FIELDS)}`)
   try {
     return isLocal()
       ? 'fakeAccountRev'
@@ -227556,18 +227683,13 @@ function getAccountRev() {
 /**
  * Return account secrets.
  * For local testing, change value with values from your konnector-dev-config.json
+ * @returns {Fields}
  */
 function getAccountSecret() {
+  log('info', `getAccountSecret`)
   try {
     return isLocal()
-      ? {
-          baseUrl: 'https://test.fr',
-          sgeLogin: 'test@test.com',
-          contractId: '134567',
-          boBaseUrl: 'https://botest.grandlyon.com/',
-          boToken: 'tok31n',
-          apiAuthKey: 'authkeYeasqqd56dsdq',
-        }
+      ? JSON.parse(process.env.COZY_FIELDS)
       : JSON.parse(process.env.COZY_PARAMETERS).secret
   } catch (err) {
     throw new Error(
@@ -227666,7 +227788,7 @@ module.exports = { getAccountId, getAccountRev, getAccountSecret }
 /******/ 	// module cache are used so entry inlining is disabled
 /******/ 	// startup
 /******/ 	// Load entry module and return exports
-/******/ 	var __webpack_exports__ = __webpack_require__(__webpack_require__.s = 1606);
+/******/ 	var __webpack_exports__ = __webpack_require__(__webpack_require__.s = 1607);
 /******/ 	
 /******/ })()
 ;
\ No newline at end of file
diff --git a/package.json b/package.json
index 54f2e5454affb2a7a7bd9f34645041b1d3eb6cb9..64ee0afcc690a3836523ba5ac48a5da2d7ddb72d 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
 {
-  "name": "enedis-sge-konnector",
-  "version": "1.0.0",
+  "name": "enedissgegrandlyon",
+  "version": "1.0.1",
   "description": "",
   "repository": {
     "type": "https",
@@ -46,7 +46,7 @@
   },
   "dependencies": {
     "axios": "^0.27.2",
-    "cozy-konnector-libs": "4.54.0",
+    "cozy-konnector-libs": "4.55.0",
     "easy-soap-request": "^4.7.0",
     "jest": "^28.1.3",
     "moment": "^2.29.3",
@@ -54,7 +54,7 @@
     "xml2js": "^0.4.23"
   },
   "devDependencies": {
-    "cozy-jobs-cli": "1.18.2",
+    "cozy-jobs-cli": "1.19.1",
     "cozy-konnector-build": "1.3.4",
     "eslint-config-cozy-app": "1.3.3",
     "eslint-plugin-prettier": "^4.0.0",