Announcing the Saviynt Knowledge Exchange unifying the Saviynt forums, documentation, training,
and more in a single search tool across platforms. Read the announcement here.

Facing Issue while creating task to setup out off office message

mollasiraj
Regular Contributor
Regular Contributor

Hi All,

Below is the postman setup that I am using for setting up the automatic reply -

mollasiraj_0-1681240159336.png

Postman Url - https://graph.microsoft.com/v1.0/users/{upn}/mailboxSettings

Postman Method-PATCH

Authorization Bearer Token

Postman Body - 

{
"automaticRepliesSetting": {
        "status""alwaysEnabled",
        "externalAudience""contactsOnly",
        "internalReplyMessage""<html>\n<body>\n<div>I'm on vacation!</div>\n<div><br>\n</div>\n<div>Kindly regards</div>\n<div></div>\n</body>\n</html>\n",
        "externalReplyMessage""<html>\n<body>\n<div></div>\n<div>I am on leave due to some emergency</div>\n<div><br>\n</div>\n<div>Kindly regards</div>\n</body>\n</html>\n"
    }
}

But when I am using the same in the azure update account I am facing some issue-below are the two json that tried but getting error-

 

{
"call": [{
"name": "call1",
"connection": "userAuth",
"url": "https://graph.microsoft.com/v1.0/users/${account.accountID}/mailboxSettings",
"httpMethod": "PATCH",
"httpParams": {"automaticRepliesSetting": {"status": "alwaysEnabled","externalAudience": "contactsOnly","internalReplyMessage": "<html>\n<body>\n<div>I'm on vacation!</div>\n<div><br>\n</div>\n<div>Kindlyregards</div>\n<div></div>\n</body>\n</html>\n","externalReplyMessage": "<html>\n<body>\n<div></div>\n<div>I am on leave due to some emergency</div>\n<div><br>\n</div>\n<div>Kindly regards</div>\n</body>\n</html>\n"}},
"httpHeaders": {
"Authorization": "${access_token}"
},
"httpContentType": "application/json",
"successResponses": {
"statusCode": [200, 201, 204, 205]
}
}]
}

If I am using the above json I am getting below error-

"call1":{"message":"No signature of method: com.saviynt.provisoning.rest.RestUtilService.getDynamicBindString() is applicable for argument types: (java.util.LinkedHashMap, java.util.HashMap) values: [[automaticRepliesSetting:[status:alwaysEnabled, ...]], ...]\nPossible solutions: getDynamicBindString(java.lang.String, java.util.Map)","status":"Failed"}}

 

2nd json-

{
"call":[
{
"name":"call1",
"connection":"userAuth",
"url":" https://graph.microsoft.com/v1.0/users/${account.accountID}/mailboxSettings",
"httpMethod":"PATCH",
"automaticRepliesSetting":{
"httpParams":"{\"status\": \"alwaysEnabled\",\"externalAudience\": \"contactsOnly\",\"internalReplyMessage\": \"I'm on vacation!\",\"externalReplyMessage\": \"I am on leave due to some emergency Kindly regards\"}"
},
"httpHeaders":{
"Authorization":"${access_token}"
},
"httpContentType":"application/json",
"successResponses":{
"statusCode":[
200,
201,
204,
205
]
}
}
]
}

If I am using above one I am getting below error-

{"headers":null,"message":"","statusCode":null,"description":null,"status":"Failed"}

 

Please let me know how I can fix this issue.

 

With Regards,

Siraj Molla

6 REPLIES 6

Rishi
Saviynt Employee
Saviynt Employee

@mollasiraj we are trying to replicate this json in our internal environment and check if we get similar error. We will provide an update shortly.

SB
Saviynt Employee
Saviynt Employee

@mollasiraj Can you update ConfigJSON param in the connection with value {"showLogs":true}. Then run the prov job with the 2nd JSON you are using. This will print addiotnal logs and help to identify what might be causing the issue.


Regards,
Sahil

timchengappa
Saviynt Employee
Saviynt Employee

Hi @mollasiraj

in addition to the approach @SB mentioned, can you also please try the below JSON? The error meant that it is expecting a string value... I've enclosed your JOSN in quotes and escaped the inner quotes...

{
"call": [{
"name": "call1",
"connection": "userAuth",
"url": "https://graph.microsoft.com/v1.0/users/${account.accountID}/mailboxSettings",
"httpMethod": "PATCH",
"httpParams": "{\"automaticRepliesSetting\": {\"status\": \"alwaysEnabled\",\"externalAudience\": \"contactsOnly\",\"internalReplyMessage\": \"<html>\n<body>\n<div>I'm on vacation!</div>\n<div><br>\n</div>\n<div>Kindlyregards</div>\n<div></div>\n</body>\n</html>\n\",\"externalReplyMessage\": \"<html>\n<body>\n<div></div>\n<div>I am on leave due to some emergency</div>\n<div><br>\n</div>\n<div>Kindly regards</div>\n</body>\n</html>\n\"}}",
"httpHeaders": {
"Authorization": "${access_token}"
},
"httpContentType": "application/json",
"successResponses": {
"statusCode": [200, 201, 204, 205]
}
}]
}

Hi @timchengappa

I am getting below error when I am using the above format-

"call1":{"message":"Illegal unquoted character ((CTRL-CHAR, code 10)): has to be escaped using backslash to be included in string value\n at [Source: {\"automaticRepliesSetting\": {\"status\": \"alwaysEnabled\",\"externalAudience\": \"contactsOnly\",\"internalReplyMessage\": \"<html>\n<body>\n<div>I'm on vacation!</div>\n<div><br>\n</div>\n<div>Kindlyregards</div>\n<div></div>\n</body>\n</html>\n\",\"externalReplyMessage\": \"<html>\n<body>\n<div></div>\n<div>I am on leave due to some emergency</div>\n<div><br>\n</div>\n<div>Kindly regards</div>\n</body>\n</html>\n\"}}; line: 1, column: 123]","status":"Failed"}}

 

Please let me know how this issue can be fix.

With Regards,

Siraj Molla

SB
Saviynt Employee
Saviynt Employee

The error I believe as it states is due to the HTML code we are passing in the JSON. I would recommend to first try with Call2 JSON that you have mentioned above, to ensure the prov is successful. And then we can check for the HTM Code.

If without the HTML works, try to escape the backward slash within the HTML code (ex: <html>\\n)


Regards,
Sahil

mollasiraj
Regular Contributor
Regular Contributor

Hi Sahil,

I reformatted my json like below and Now it is working.

{
"call": [
{
"name": "call1",
"connection": "userAuth",
"url": "https://graph.microsoft.com/v1.0/users/${account.accountID}/mailboxSettings",
"httpMethod": "PATCH",
"httpParams": "{\"automaticRepliesSetting\": {\"status\": \"alwaysEnabled\",\"externalAudience\": \"contactsOnly\",\"internalReplyMessage\": \"<html><body><div>I'm on vacation!</div><div><br></div><div>Kindly regards</div><div></div>${user.firstname} ${user.lastname}</body><br></html>\",\"externalReplyMessage\": \"<html><body><div></div><div>I am on leave due to some emergency</div><div><br></div><div>Kindly regards</div>${user.firstname} ${user.lastname}</body><br></html>\"}}",
"httpHeaders": {
"Authorization": "${access_token}"
},
"httpContentType": "application/json",
"successResponses": {
"statusCode": [
200,
201,
204,
205
]
}
}
]
}

 

With Regards,

Siraj Molla