Programmatically connect Azure Communication service with Cognitive services (AI services)

Emmanuel LETREMBLE 0 Reputation points
2024-06-13T08:31:38.8466667+00:00

Hello, I'm working on reproducing a project deployment with Terraform. I successfully provisioned and set up all the resources except one particular setting which consists of linking my Azure Communication service with one of my Azure AI Services (aka Cognitive services).

Here is a screenshot of the step I'm trying to reproduce programmatically:
Capture d'écran 2024-06-07 181058

Is there a way to reproduce this particular step? I'm open to any solution using the Python SDK, the REST api, the az terminal tool etc...

Thanks in advance!

Azure Communication Services
Azure Communication Services
An Azure communication platform for deploying applications across devices and platforms.
772 questions
Azure AI services
Azure AI services
A group of Azure services, SDKs, and APIs designed to make apps more intelligent, engaging, and discoverable.
2,559 questions
{count} votes

1 answer

Sort by: Most helpful
  1. ajkuma 24,076 Reputation points Microsoft Employee
    2024-06-26T04:29:43.74+00:00

    @Emmanuel LETREMBLE , Apologies for the delayed response.

    You may try the AZ CLI approach:

    az role assignment create `
      --assignee-object-id {service principal id} `
      --assignee-principal-type ServicePrincipal `
      --scope "{cognitive service id}" `
      --role "Cognitive Services User"
    
    
    

    The user or service that executes the script needs to have the owner or RBAC Admin role.

    If you have any further questions, please let us know, I'll be more than happy to follow-up.


    If the answer helped (pointed, you in the right direction) > please click Accept Answer - it will benefit the community to find the answers quickly. 

    0 comments No comments