Check the ClientId/ClientSecret of your App

I have had a problem today that a provider hosted app that I’ve been working on would deploy and work in an F5-Debug deployment, but when I tried to do a proper deployment, well, it wouldn’t work. I already thought I knew what I needed to change between an F5 and a proper deployment – so what was wrong?

Well, after much head scratching, I think I found the culprit – white space in the ClientSecret of the Azure website that I was working on. In the site I had my site configured with:


Where what I needed was:


Yes, there’s no apparent difference. Even leading white space is hard to spot in this site – much harder than in a text editor with a fixed-width font.

Once I removed the space, everything started to work. I was a little surprised – I would have though that after reading the setting in there might be a .trim() command, but apparently not.

Check the ClientId/ClientSecret of your App

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.