Behavior:
When attempting to establish a connection to DocuWare via the REST API, the following error is returned,
<html>
<head><title>403 Forbidden</title></head>
<body>
<center><h1>403 Forbidden</h1></center>
<hr><center>Microsoft-Azure-Application-Gateway/v2</center>
</body>
</html>
Solution:
For this issue, we would need to look at the headers being sent in our request.
If we used Postman to convert a Rest call into a different language, we'd need to include the User-Agent header in our request. Otherwise, 403 will be returned.
For example, if we used Postman to convert to Python - Requests, then this is the code we get,
This code will not include headers such as User-Agent, which must be addressed before we're able to send the request.
Adding the User-Agent, like in the following example, will resolve the 403 error.
'User-Agent': 'Chrome/160.0.0.0',
If the error still occurs after adding the User-Agent header, then the headers will need further investigation, which Postman could be helpful for.
KBA is applicable for both Cloud and On-premise Organizations.