Assistance Needed: API Endpoint for Transitioning Meraki Licensing Model from Coterm to Subscription

Solved
semsem2050
Here to help

Assistance Needed: API Endpoint for Transitioning Meraki Licensing Model from Coterm to Subscription

Hello all,

 

I've noticed that when creating a new organization in Cisco Meraki, the default licensing model is cotermination.

I have been using the following Ansible task to add a subscription license, but it consistently fails:


- name: Claim subscription licensing
cisco.meraki.administered_licensing_subscription_subscriptions_claim:
meraki_api_key: "{{ auth_key }}"
claimKey: "{{ subscription_claim_key }}"
name: "networks subscription license"
organizationId: "{{ org_id }}"
validate: true

 

It gives this error:

TASK [claim_organization_license ] *******
133An exception occurred during task execution. To see the full traceback, use -vvv. The error was: <center><h1>404 Not Found</h1></center>please wait a minute if the key or org was just newly created.
134fatal: [localhost]: FAILED! => {"changed": false, "msg": "An error occured when executing operation.The error was: licensing, claimAdministeredLicensingSubscriptionSubscriptions - 404 Not Found, <html>\r\n<head><title>404 Not Found</title></head>\r\n<body>\r\n<center><h1>404 Not Found</h1></center>please wait a minute if the key or org was just newly created."}

 

 

This task works as expected when tested with an organization where the subscription license was added manually. However, it fails when applied to a newly created organization.

 

I am attempting to automate the transition from the default coterm license model to a subscription licensing model using Ansible. Could anyone provide guidance on the correct API endpoint?

 

Thank you in advance for your help!


Update: 2 post updated by adding the error details when it fails.

1 Accepted Solution

Hi @semsem2050 I don't see any obvious explanation for the issue. I recommend working with Meraki Support to help triage the issue.

View solution in original post

5 Replies 5
John_on_API
Meraki Employee
Meraki Employee

Hi @semsem2050, thanks for asking! Exciting to hear that you're using Ansible. Just curious, are you using Meraki's official Ansible modules or rolling your own?

 

The following are prereqs for claiming a subscription into an organization:

  1. You must be an org-write admin.
  2. The organization must not have any active co-term licenses.

 

It sounds like you are using the correct operation, claimAdministeredLicensingSubscriptionSubscriptions .

 

If I had to guess, you might not have org-write admin privileges. But hopefully the above helps nail it down.

 

It would also help if you try to recreate the issue in Postman--taking Ansible out of the equation. That way you're not simultaneously troubleshooting both an API error and a possible Ansible issue.

semsem2050
Here to help

Hi @John_on_API,

 

Thanks for your response! I can confirm that I have org-write admin privileges and that the organization does not have any active co-term licenses. I'm also using Meraki's official Ansible modules for rolling out the configurations.

 

I will try to recreate the issue in Postman as you suggested and will update you on the outcome.

 

Thanks again!

Semsem2050

semsem2050
Here to help

 

Hi @John_on_API ,

 

I tested the process using both Postman and the curl tool, but encountered an error. Here’s what I did:

```bash
$ curl -L --request POST \
--url https://api.meraki.com/api/v1/administered/licensing/subscription/subscriptions/claim \
--header 'Authorization: Bearer xxxxxxxxxxxxxxxxxxx' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--data '{
"validate": true,
"claimKey": "xxxxxxxxxxxxxxxxxxx",
"organizationId": "xxxxxxxxxxxxxxxxxxxxxx",
"name": "Claim subscription",
"description": "Subscription for office Network"
}'

<html>
<head><title>404 Not Found</title></head>
<body>
<center><h1>404 Not Found</h1></center>
<hr><center>nginx</center>
</body>
</html>

```

The response returned a 404 Not Found error.

Just to clarify, the organization has no active licenses, and I created it from scratch. I'm trying to figure out how to claim the subscription license using Ansible before adding it manually. In a previous case, when I added the license manually, the org's status changed to "Subscription & License Info" (subscription license model) as expected.

Also, I use this module (cisco.meraki collection version 2.18.1) to develop the Ansible playbooks.

Any further insights would be greatly appreciated!

 

Thanks,

semsem2050_1-1724675314885.png

 

Hi @semsem2050 I don't see any obvious explanation for the issue. I recommend working with Meraki Support to help triage the issue.

semsem2050
Here to help

Thank you, @John_on_API, I will do.

Get notified when there are additional replies to this discussion.