PDA

View Full Version : Invalid client secret



Albin
26-Oct-2016, 01:19 AM
Hi.

We have a webapp running using oAuth2 Office365 Rest API.
Works great.
Now we started a second webapp (the same application on the same server) that is pointing to another database.
We registered the application in Azure AD and set the URL:s, copied the ID:s and created a new Client Secret key. Put it all in our new webapp.

But we got a message saying, "Invalid client secret is provided".
So we created a new key and put in our webapp. Got the same message.
We deleted the webapp from Azure AD and created it again. Still we get "Invalid client secret is provided"...

What more needs/can be done??

Albin
26-Oct-2016, 09:41 AM
Hi.

We have a webapp running using oAuth2 Office365 Rest API.
Works great.
Now we started a second webapp (the same application on the same server) that is pointing to another database.
We registered the application in Azure AD and set the URL:s, copied the ID:s and created a new Client Secret key. Put it all in our new webapp.

But we got a message saying, "Invalid client secret is provided".
So we created a new key and put in our webapp. Got the same message.
We deleted the webapp from Azure AD and created it again. Still we get "Invalid client secret is provided"...

What more needs/can be done??

Solved it by removing and creating a new Client secret key 7 times. The 7th key worked...

Mike Peat
27-Oct-2016, 02:27 AM
Albin

Yes, I have had the same kind of problem in the past. And not just with Microsoft - also with Google. It seems to be a provider problem (i.e. Microsoft or Google). In the courses on this I gave in Berlin in May, which used Google as an example, we had instances of people having to create and delete their credentials multiple times before it worked (I think three times worked in every case then - seven is harsh! <g>). I have a suspicion (unconfirmed by any evidence, so should not be relied on) that it may be a timing issue, with the credentials not being propagated across the provider's global infrastructure in a timely manner, but I really don't know. Like you, I have come up with no better solution that delete and try again until it finally works. :-(

Sorry not to have a better answer. Perhaps ask Microsoft - in their case it is a service you will be paying for, so can reasonably demand answers.

Mike

Albin
27-Oct-2016, 03:07 AM
Albin

Yes, I have had the same kind of problem in the past. And not just with Microsoft - also with Google. It seems to be a provider problem (i.e. Microsoft or Google). In the courses on this I gave in Berlin in May, which used Google as an example, we had instances of people having to create and delete their credentials multiple times before it worked (I think three times worked in every case then - seven is harsh! <g>). I have a suspicion (unconfirmed by any evidence, so should not be relied on) that it may be a timing issue, with the credentials not being propagated across the provider's global infrastructure in a timely manner, but I really don't know. Like you, I have come up with no better solution that delete and try again until it finally works. :-(

Sorry not to have a better answer. Perhaps ask Microsoft - in their case it is a service you will be paying for, so can reasonably demand answers.

Mike

Ok, Thanks Mike.