Experiencing the same like above with sending email through REST API.
Getting 401 Unauthorized code when accessing Azure Communication Services API with bearer token
Hello,
I want to access an Azure Communications Service API using Postman. I am trying to hit the endpoint:
POST {endpoint}/identities/{id}/:issueAccessToken?api-version=2022-06-01
where {endpoint} is my ACS endpoint and {id} is the identity generated for voip calls in the User Access Token & Identities blade in Azure.
Header:
My request body:
{
"scopes": [
"voip"
]
}
HTTP Response code: 401 Unauthorized
Response body:
{
"error": {
"code": "Denied",
"message": "Denied by the resource provider."
}
}
I have been following:
https://learn.microsoft.com/en-us/azure/active-directory/develop/v2-oauth2-client-creds-grant-flow
From my understanding, I need to have a bearer token for authentication. I have been able to obtain the bearer token via testing in Postman using information from my Service Principal.
That Service Principal has permission to access my resource group.
It also has API permissions to access Azure Communication Services.
The Communication Service, through Access Control, has given the service principal a role.
What do I need to do to be able to access this API? Thanks.
3 answers
Sort by: Most helpful
-
-
Deleted
This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.
Comments have been turned off. Learn more
-
Deleted
This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.
Comments have been turned off. Learn more