HttpResponseError: Operation returned an invalid status 'Forbidden' when creating search index using Azure AI SearchIndexClient()
I've followed a post(link below) in which the same issue was faced while creating a search index.
https://learn.microsoft.com/en-us/answers/questions/1640592/error-when-creating-azure-ai-search-index-with-rol
index = SearchIndex(name=index_name, fields=fields, vector_search=vector_search, semantic_search=semantic_search)
result = index_client.create_or_update_index(index)
HttpResponseError: Operation returned an invalid status 'Forbidden'
I have assigned "Search Index Contributor" role to myself for the Azure AI search resource. In the linked post, the user solved the issue by assigning the mentioned role along with setting up an environment variable for the compute which confuses me.
os.environ['AZURE_CLIENT_ID'] = '<client id of the compute>'
How do I determine the information for this environment variable?
Also, do I assign myself the Search Index Contributor for Azure AI Studio resource?
For context, I'm creating prompt flows in Azure AI studio and would be needing to call the SearchClientIndex() using the compute instance created using the Azure AI studio.
TIA