0

Very Similar problem to AADSTS50012: Invalid client secret is provided when moving from a Test App to Production

The top answer says to Encode your secret e.g. replace + by %2B and = by %3D, etc how would I replace the special character Tilde ~

tommyt
  • 309
  • 5
  • 15
  • Which programming language/libraries are you using? There is a good chance that there is a library function that will URL encode the value for you. – juunas May 17 '22 at 11:12
  • @juunas Using python – tommyt May 17 '22 at 11:16
  • Would this work? https://stackoverflow.com/a/9345102/1658906 – juunas May 17 '22 at 11:43
  • @juunas problem is got this key in azure DevOps library in a variable group so just storing the key and calling it in the pipeline. want to keep it that way that's why liked the answer on StackOverflow which just replaces a special character in the key directly such as + by %2B if there was something like that for ~ would be ideal – tommyt May 17 '22 at 11:51
  • 1
    Ah, I see. In that case this reference should be helpful: https://www.w3schools.com/tags/ref_urlencode.asp – juunas May 17 '22 at 11:52

1 Answers1

1
  • As Suggested by juunas, and as per the document yes, you can replace the special character.

URL encoding converts characters into a format that can be transmitted over the Internet.

enter image description here

  • Here is the link for complete information regarding Encoding Techniques.
SaiSakethGuduru
  • 2,218
  • 1
  • 5
  • 15