Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uvdesk Microsoft Apps configuration error #698

Open
tsxsys opened this issue Oct 10, 2023 · 9 comments
Open

Uvdesk Microsoft Apps configuration error #698

tsxsys opened this issue Oct 10, 2023 · 9 comments

Comments

@tsxsys
Copy link

tsxsys commented Oct 10, 2023

Hi All, I have install Opensource UVdesk version 1.2 running on Linux Plesk server but I cannot get the email from the O365 as ticket in my UVdesk. I have tried to Integrate Microsoft App to my Opensource UVdesk using these steps How To Integrate Microsoft App to your Opensource UVdesk on completion I get

Microsoft app settings could not be verified successfully. Please check your settings and try again later.

image

Please guide me what can I do for this.

@komal-sh-27
Copy link

@tsxsys ,

If you're getting this error, it means that the app wasn't able to successfully retrieve the access token. In order to debug what went wrong, could please the make the following changes as well:

File Path:

project/vendor/uvdesk/core-framework/Services/MicrosoftIntegration.php

Add the following lines of code at line #61 (I've attached a screenshot for reference):

dump($accessCode);
dump($curlResponse);
dump($jsonResponse);
die;

image

After making the following changes, go ahead and try setting up/verifying the app again. You'll be taken to microsoft login for authenticating the request, and then redirected back to your helpdesk and the access token response will be dumped.

In case of any errors, this will let us know what went wrong during authentication and we can then further suggest to resolutions accordingly. Also, please share your screenshots.

@tsxsys
Copy link
Author

tsxsys commented Oct 10, 2023

@Komal-sharma-2712

I have errors here

MicrosoftIntegration.php on line 63:
array:6 [▼
"error" => "invalid_client"
"error_description" => """
AADSTS500112: The reply address 'httpss://localuvdesk.com/skeleton/public/en/admin/integrations/microsoft-apps/oauth/login' does not match the reply address 'ht ▶
Trace ID: xxxxxxxx
Correlation ID: xxxxxxxx
Timestamp: 2023-10-10 15:27:39Z
"""
"error_codes" => array:1 [▼
0 => 500112
]
"timestamp" => "2023-10-10 15:27:39Z"
"trace_id" => "xxxxxxx"
"correlation_id" => "xxxxxxxx"
]

I can see httpss but I input https in the 365 I don't know if that could be an issue?

Any update on this yet?

@komal-sh-27
Copy link

@tsxsys ,

Thanks for the updated here. Let us know, your project installed on server or live, because for using microsoft app option your project should be on live or server.

For this error once you will be change some code on your project, please follow the below steps:

MicrosoftIntegration.php on line 63:
array:6 [▼
"error" => "invalid_client"
"error_description" => """
AADSTS500112: The reply address 'httpss://localuvdesk.com/skeleton/public/en/admin/integrations/microsoft-apps/oauth/login' does not match the reply address 'ht ▶

Step 1: Go to your project, open the 'MicrosoftApps.php' file under your project follow the below path:

vendor/uvdesk/core-framework/Controller/MicrosoftApps.php

Now change the below this line no. on 149:

$redirectEndpoint = str_replace('http', 'https', $this->generateUrl('uvdesk_member_core_framework_integrations_microsoft_apps_oauth_login', [], UrlGeneratorInterface::ABSOLUTE_URL));

to

$redirectEndpoint = str_replace('http://', 'https://', $this->generateUrl('uvdesk_member_core_framework_integrations_microsoft_apps_oauth_login', [], UrlGeneratorInterface::ABSOLUTE_URL));

image

Step 2: After saved this line then clear cache of your project using the below command:

$ php bin/console c:c

Please make a try with these changes and check again showing any error or not.

@tsxsys
Copy link
Author

tsxsys commented Oct 15, 2023

Hi @Komal-sharma-2712

Mailbox connected now but not fetching emails in UVdesk
I get this error when I run

$ php bin/console c:c
$ php bin/console uvdesk:refresh-mailbox [email protected]

ERROR Failed to connect to localhost port 8000 after 0 ms: Connection refused

image

Please guide me what can I do for this to work?

@komal-sh-27
Copy link

Hello @tsxsys ,

Thanks for the updated here. As per shared your screenshots, in your project site url is not correct. Please save the email settings of your project. Also, once you set the correct site url in your project. Please follow the below steps.

Step 1: Open your project and go to the uvdesk.yaml file under your project. Follow the below file path:

your-project/config/packages/uvdesk.yaml

image

Step 2: After saved site url then clear cache of your project using the below command:

$ php bin/console c:c

Please make a try with these changes and check again with refresh mailbox command showing any error or not.

@tsxsys
Copy link
Author

tsxsys commented Oct 16, 2023

Thanks for the quick response. I have made those changes but get this error
image

@komal-sh-27
Copy link

@tsxsys ,

Once you check again your site url is correct or not. Because here error shows port 80. Please check it once again.
Let us know, you are using your project on localhost or docker.

@tsxsys
Copy link
Author

tsxsys commented Oct 16, 2023

@Komal-sharma-2712

It's on localhost on a cloud live server.

Do I have to put a domainname.com for the site url or localhost is okay?

I have SSL installed for the domain how can I change the port if it's running http to https?

@komal-sh-27
Copy link

@tsxsys,

Do I have to put a domainname.com for the site url or localhost is okay?

Yes, you can add with the localhost domain name.

I have SSL installed for the domain how can I change the port if it's running http to https?

For this you can contact with your web server assistant.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants