I have created a resource for Azure API Graph Email Integration resource and passed the credentials through Terraform cloud. On Genesys UI, I see below error message -
Integration failed to enable: Authentication Error. Reason: AADSTS90014: The required field 'scope' is missing from the credential. Ensure that you have all the necessary parameters for the login request.
The credential resource is as below which is according to the required template:
resource "genesyscloud_integration_credential" "Integration-Azure_Graph_Api" {
credential_type_name = "azureGraphApiCredentialFlow"
fields = { // User defined credentials allow any arbitrary key/value pairs
clientId = var.azureClientId
clientSecret = var.azureClientSecret
authorityUri = var.azureloginURL
scopes = "https://graph.microsoft.com/.default"
}
name = "Integration-xxxxxx"
}
=== Required Credential template per Genesys docs============
{
"name": "azureGraphApiCredentialFlow",
"properties": {
"clientId": {
"type": "string",
"title": "Client ID",
"description": "The Client ID from the Azure application.",
"sensitive": false
},
"authorityUri": {
"type": "string",
"title": "Access token endpoint",
"description": "URL to retrieve access token from the Azure authorization service. Pattern: https://login.microsoftonline.com/{tenantId}/oauth2/v2.0/token",
"pattern": "^https://(?!.*\\{)(?!.*\\}).*",
"patternErrorText": "The endpoint does not comply with URL expected pattern.",
"sensitive": false
},
"clientSecret": {
"type": "string",
"title": "Client Secret",
"description": "The Client Secret from the Azure application.",
"sensitive": true
},
"scopes": {
"type": "string",
"title": "Scopes",
"description": "List of scopes seperated by a space. Default value is https://graph.microsoft.com/.default",
"sensitive": false,
"default": https://graph.microsoft.com/.default
}
},
"displayOrder": [
"clientId",
"clientSecret",
"authorityUri",
"scopes"
],
"required": [
"clientId",
"clientSecret",
"authorityUri"
]
},
I have tested with various keywords for 'scopes' like Scope, Scopes, scope but it shows the same error every time. Can someone please help here?
Regards
Jyoti
#CXasCode------------------------------
Jyoti Sharma
Senior Design Consultant
------------------------------