@Nagwekar, Shruti Based on the error message you provided, it seems that the operation is returning a 'Forbidden' status, which indicates that the request is not authorized to access the resource. This could be due to a number of reasons, such as incorrect credentials or insufficient permissions.
One possible reason for this error could be that the MSI of the compute does not have the necessary permissions to create an index on the Azure AI Search Service. To fix this, you can try granting the MSI the necessary permissions to create an index on the Azure AI Search Service.
To grant the MSI the necessary permissions, you can follow these steps:
- Go to the Azure portal and navigate to the Azure AI Search Service.
- Click on the "Access control (IAM)" tab.
- Click on the "+ Add" button and select "Add role assignment".
- In the "Add role assignment" pane, select the "Search Service Contributor" role.
- In the "Add members" pane, search for the name of the MSI of the compute and select it.
- Click on the "Save" button to save the role assignment.
After granting the MSI the necessary permissions, you can try running your Python code again to create the search index.