question

NC0202-5867 avatar image
0 Votes"
NC0202-5867 asked ChaitanyaNaykodiMSFT-9638 answered

How to periodically force APIM consumer change subscription key?

Hi, we have a strong corporate security policy that each APIM consumer team need to change APIM subscription key periodically., ex: monthly or quartly
Similar scenario like following two posts
azure-api-management-subscription-expiration
how-to-edit-subscription-in-azure-api-management

I can find startDate and expirationDate in subscription json, and it seems there indeed a state called expired in the document.
53258-image.png
53187-image.png



Our question is
Q1 : How do we manipulate this subscription key change/expired ? Is there any API or UI that we could leverage ?
Q2 : Since each team has different subscription key activation date, is there a suggested elegant way to handle this ?

Need your advice, thank you!

azure-api-management
image.png (172.4 KiB)
image.png (79.7 KiB)
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

ChaitanyaNaykodiMSFT-9638 avatar image
0 Votes"
ChaitanyaNaykodiMSFT-9638 answered

Hello @NC0202-5867, Thank you for reaching out. I think you can use the APIM management API to implement the required functionality.
Using the functionalities listed here, you can get the list of subscriptions and depending on their start-dates the subscription keys can be regenerated. To completely automate this process you can maybe have a timer triggered function app with a static HTTP client using which you can perform the REST API calls mentioned above. Please let me know if there are any concerns, I will be glad to continue with our discussion.


5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.