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

Uncaught Exception: Could not find EndorsingSupportingTokens tag in provided security policy XML #82

Closed
Rgodinho22 opened this issue Mar 20, 2019 · 8 comments

Comments

@Rgodinho22
Copy link

Rgodinho22 commented Mar 20, 2019

Im having this error message with this log

Fatal error: Uncaught Exception: Could not find EndorsingSupportingTokens tag in provided security policy XML in alexacrm\php-crm-toolkit\src\Client.php:340 Stack trace: #0 alexacrm\php-crm-toolkit\src\Client.php(308): AlexaCRM\CRMToolkit\Client->getSecurityAddress(Object(DOMElement), 'Federation') #1 alexacrm\php-crm-toolkit\src\Client.php(624): AlexaCRM\CRMToolkit\Client->getOrganizationAuthenticationAddress() #2 alexacrm\php-crm-toolkit\src\Client.php(160): AlexaCRM\CRMToolkit\Client->getFederationSecurityURI('organization') #3 alexacrm\php-crm-toolkit\examples\teste.php(19): AlexaCRM\CRMToolkit\Client->__construct(Object(AlexaCRM\CRMToolkit\Settings)) #4 {main} thrown in alexacrm\php-crm-toolkit\src\Client.php on line 340

my code

`<?php

require_once '../../../autoload.php';

use AlexaCRM\CRMToolkit\Client as OrganizationService;
use AlexaCRM\CRMToolkit\Settings;

$options = [
'serverUrl' => 'https://xxxx.company.com/XRMServices/2011/Organization.svc',
'username' => 'user',
'password' => '****',
'authMode' => 'Federation',

];

$serviceSettings = new Settings( $options );
$service = new OrganizationService( $serviceSettings );
/*
$contact = $service->entity( 'contact', $contactid );
echo "{$contact->fullname}" . PHP_EOL;*/
?>`

@georged
Copy link
Contributor

georged commented Mar 20, 2019

Hi @Rgodinho22

serverUrl is literally server url not service endpoint. Try this:

$options = [
'serverUrl' => 'https://xxxx.company.com/',
'username' => 'user',
'password' => '****',
'authMode' => 'Federation',
];

Thanks

@georged georged closed this as completed Mar 20, 2019
@Rgodinho22
Copy link
Author

Rgodinho22 commented Mar 21, 2019

i have the same error

@georged
Copy link
Contributor

georged commented Mar 21, 2019

do you have your organization configured for IFD? If yes, could you email your org url to support@alexacrm.com?

@Rgodinho22
Copy link
Author

the configuration is CRM On-premise

@georged
Copy link
Contributor

georged commented Mar 21, 2019

Let me repeat the question: have you configured IFD?
See docs

If not then note that IFD is required.
If yes, email your organization url to support@alexacrm.com

@Rgodinho22
Copy link
Author

Rgodinho22 commented Mar 21, 2019

How i know if IFD is configured? Because i think it isn't

@georged
Copy link
Contributor

georged commented Mar 21, 2019

If IFD is configured, the prompt to login is a form
If IFD is not configured then the prompt is basic prompt (dialog) by the browser
Read the docs

@Rgodinho22
Copy link
Author

Rgodinho22 commented Mar 21, 2019

its the second option, it prompt a basic dialog to login on browser.
thx for clarification

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

No branches or pull requests

2 participants