IwillMinkin
IwillMinkin

Reputation: 107

Azure API Management REST API calls suddenly fail

I'm automating parts of my API Management tenant and suddenly receive '401 Unauthorized' messages in my code. Any ideas how I can detect why this is happening?

Upvotes: 1

Views: 890

Answers (1)

user3922344
user3922344

Reputation:

heck to see if you still have an authorization header included in your requests (as probably will be the case). In there you see a querystring like value starting with &ex=[SOME DATA/TIME VALUE]. Like this:

Authorization: SharedAccessSignature uid=53dd860e1b72ff0467030003&ex=2014-08-04T22:03:00.0000000Z&sn=ItH6scUyCazNKHULKA0Yv6T+Skk4bdVmLqcPPPdWoxl2n1+rVbhKlplFrqjkoUFRr0og4wjeDz4yfThC82OjfQ==

This probably is an expired date. Regenerate a new SAS in the portal or through code. In the Azure portal you can click on Manage and in the AAM portal you click on 'Security', as described here: https://msdn.microsoft.com/en-us/library/azure/dn798668.aspx#ProgrammaticallyCreateToken

Upvotes: 1

Related Questions