applearrow / azure-comm-service-admin

Python scripts to create a user and grab an access token for Azure Communication Services
Apache License 2.0
0 stars 0 forks source link

Is this working? #1

Open ankbs opened 3 years ago

ankbs commented 3 years ago

Hi @applearrow Thank you for sharing.... sorry, but is this working? I'm asking, because i have only following result:

PS C:\ACS\azure-comm-service-admin-master> python acs.py -c create_grant Command: create_grant Exception: 'endpoint=https://acs-xxxxx-01-ressource.communication.azure.com/;accesskey=xxxxxxxxxxx+kQntu+oqt1L7mtucZ0CRXn7alId/QRyyyyyyyyyyyypPHDCeN3TTmIpNzFPxQkLL3w=='

My code for the key is:

connection_string = os.environ['endpoint=https://acs-xxxxxxx-01-ressource.communication.azure.com/;accesskey=xxxxxxxx+kQntu+oqt1L7mtucZ0CRXn7alId/QRk4j0neyyyyyyyyyN3TTmIpNzFPxQkLL3w==']

Sorry, but I changed the original accesskey ;-) but this is working in two others examples. But I'm only working with the public preview

Thanks for your help

PS: others are working like - list with correct response "... not implemented yes"...

applearrow commented 3 years ago

Hi ankbs, it's working fine for me.

image

Please note that the protocol specified for the endpoint (in the connection string) is "sb" instead of "https". Hope that helps.

ankbs commented 3 years ago

Hi, thanks for your response.

No, it's not working. but now i open the file VS Code. There is an error:

import os import sys from azure.communication.administration import CommunicationIdentityClient import argparse

Unable to import 'azure.communication.administration'pylint(import-error)

(Correcting: found a solution: https://stackoverflow.com/questions/60898533/unable-to-import-azure-functions-pylintimport-error-3-1-and-unable-to-impo)

but it's installed (again) PS C:\ACS\azure-comm-service-admin-master> pip install azure-communication-administration Requirement already satisfied: azure-communication-administration in c:\users\michaelkirst-neshva\appdata\local\programs\python\python39\lib\site-packages (1.0.0b1)......

Error is the same....

Any Idea?

connection_string = os.environ['endpoint=sb://acs-xxxxxx-01-ressource.communication.azure.com/;accesskey=oI4XlyT9ZqrtqitU9Sk+xxxxxxxxxoqt1L7mtucZ0CRXn7alId/QRk4j0neQktEa0pPHDCeN3TTmIpNzFPxQkLL3w==']

can send you in a PM the original key, if this helping. i have now Python 3.9.0 64-bit selected.

Thanks for your time

ankbs commented 3 years ago

Hi, thanks for your response.

No, it's not working. but now i open the file VS Code. There is an error:

import os import sys from azure.communication.administration import CommunicationIdentityClient import argparse

Unable to import 'azure.communication.administration'pylint(import-error)

(Correcting: found a solution: https://stackoverflow.com/questions/60898533/unable-to-import-azure-functions-pylintimport-error-3-1-and-unable-to-impo)

but it's installed (again) PS C:\ACS\azure-comm-service-admin-master> pip install azure-communication-administration Requirement already satisfied: azure-communication-administration in c:\users\michaelkirst-neshva\appdata\local\programs\python\python39\lib\site-packages (1.0.0b1)......

Error is the same....

Any Idea?

connection_string = os.environ['endpoint=sb://acs-xxxxxx-01-ressource.communication.azure.com/;accesskey=oI4XlyT9ZqrtqitU9Sk+xxxxxxxxxoqt1L7mtucZ0CRXn7alId/QRk4j0neQktEa0pPHDCeN3TTmIpNzFPxQkLL3w==']

can send you in a PM the original key, if this helping. i have now Python 3.9.0 64-bit selected.

Thanks for your time