04-20-2025 02:12 AM
I am trying to use the ISE API to create my bulk Authorization profiles. I write the following Python Code. This code create Authorization profiles, but I still unable to select and change the the Advanced Attributes parts of the profiles when I create them.
import logging
import pandas as pd
from ciscoisesdk import api, ApiError, ciscoisesdkException
import json
# Set up logging
logging.basicConfig(level=logging.INFO, format='%(asctime)s - %(levelname)s - %(message)s')
def create_authorization_profile(api_, policy_name, access_type, profile_name, left_dictionary_name, left_attribute_name, value):
    try:
        profile_data = {
            "name": policy_name,
            "profileName": profile_name,
            "accessType": access_type,
            "advancedAttributes": {
                "leftHandSideDictionaryAttribute": [
                    {
                        "dictionaryName": left_dictionary_name,
                        "attributeName": left_attribute_name,
                        "value": value
                    }
                ]
            },
            "description": "Created via Python bulk script"
        }
        # Log the request payload
        logging.debug(f"Request Data: {json.dumps(profile_data, indent=2)}")
        # Make the API call to create the authorization profile
        response = api_.authorization_profile.create_authorization_profile(**profile_data)
        if hasattr(response, 'response'):
            logging.info(f"
I will appreciation if you able to help me to write the correct code.
ISE Version : 3.3 Patch 4
Python Version: 3
Solved! Go to Solution.
04-23-2025 03:30 AM
I found the problem I want you to know it as well.
The problem was at advancedAttributes in the code. I should write it advanced_Attributes.
04-23-2025 03:30 AM
I found the problem I want you to know it as well.
The problem was at advancedAttributes in the code. I should write it advanced_Attributes.
 
					
				
				
			
		
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide