We are delighted to share our new EIC Delivery Methodology for efficiently managing Saviynt Implementations and delivering quick time to value. CLICK HERE.

Office365 Connection Failed - Error While Test connection: String index out of range: -1

Aashish-Handa
Regular Contributor
Regular Contributor

Hi Team,

We were trying to create an office 365 connection in the chinese tenant via the OOTB O365 connector but it failed with an error -  Error While Test connection: String index out of range: -1

We have also created a subsequent REST connector for O365 provisioning with the same client ID and secrets, and it is working fine.

Can you please assist on what could be the probable cause to this error.

Attached are the logs during the connection failure.

Thanks

21 REPLIES 21

Dhruv_Sharma
Saviynt Employee
Saviynt Employee

Hi @Aashish-Handa 

Please share error snippet from logs. Please validate all the connection parameters.

Regards,

Dhruv Sharma

Aashish-Handa
Regular Contributor
Regular Contributor

Hi @Dhruv_Sharma ,

Thanks for responding. PFA the error logs.

Error Snippet:

AashishHanda_0-1702045725973.png

 

Would like to mention that the same creds have been used for the REST provisioning connection and it is coming fine.
 
Thanks

Aashish-Handa
Regular Contributor
Regular Contributor

Hi Dhruv,

Any clue looking at the logs? 

Thanks

Hi @Aashish-Handa 

Thanks for your patience. We are looking into it and will keep you posted. 

Regards,

Dhruv Sharma

Can you share connection screenshot with mask values


Regards,
Rushikesh Vartak
If you find the response useful, kindly consider selecting Accept As Solution and clicking on the kudos button.

Aashish-Handa
Regular Contributor
Regular Contributor

Hi @rushikeshvartak ,

PFB

AashishHanda_0-1702453075668.png

Please let me know for anything else if required.

Thanks

Hi @Aashish-Handa 

Please validate the O365 domain/SharePoint domain. Please remove the https:// part and only keep domain like saviynt.sharepoint.com. Please let us know if the issue still exists.

Regards,

Dhruv Sharma

Aashish-Handa
Regular Contributor
Regular Contributor

Hi @Dhruv_Sharma ,

We aren't using https:// in the o365 domain. The issue still persists.

Thanks 

Hi @Aashish-Handa 

Could you please try to register the Microsoft 365 application using design feature using the same parameters and validate if it works.

Regards,

Dhruv Sharma

Aashish-Handa
Regular Contributor
Regular Contributor

Hi @Dhruv_Sharma ,

I doubt I follow what you mean by registering the Microsoft 365 application using design feature. Can you please elaborate.

Just an fyi, I have used the standard steps and prerequisite to register the app on Azure and Sharepoint using the Saviynt Documentation for this integration as well as others, and the others seem to be working fine.

Creating an Integration (saviyntcloud.com)

Thanks,

Aashish

 

Hi @Aashish-Handa 

After login to EIC->Design->Add applications-> Search Microsoft 365/Office365->create->Next->Enroll page with all the parameters will be visible. Save and test connection.

Please find the screenshots as below.

Screenshot1.PNG

Screenshot2.PNG

Screenshot5.PNG

Regards,

Dhruv Sharma

Aashish-Handa
Regular Contributor
Regular Contributor

Hi @Dhruv_Sharma ,

Thanks for the steps, however, I see Microsoft 365 Agent Authentication Token  to be populated as well.

Where can I get that from? I do not see any such field on the connection, it should be generated at runtime if I am not wrong here?

Thanks,

Aashish

Hi @Aashish-Handa 

Please refer below post for the details about Microsoft 365 Agent Authentication Token.

Office 365 test connection - Saviynt Forums - 40828

Regards,

Dhruv Sharma

Aashish-Handa
Regular Contributor
Regular Contributor

Hi @Dhruv_Sharma ,

The discussion on Office 365 test connection - Saviynt Forums - 40828does not answer the steps to how to get Microsoft 365 Agent Authentication Token. Can you please check once as well.

Thanks

Hi @Aashish-Handa 

Microsoft 365 Agent Authentication Token: - Please use postman and connect to Microsoft API to get this token. Sample screenshot here.

MSToken.PNG

Please refer below post.

Solved: IIS installation for O365 onboarding - Saviynt Forums - 39907

Also, I would request you to refer the documentation.

Creating an Integration (saviyntcloud.com)

Regards,

Dhruv Sharma

Hi Dhruv, 

I did generate the microsoft auth token as suggested by you, and completed the enrollment process.

AashishHanda_0-1706524815745.png

Not sure how this helps. Can you please provide me some insights what to do next. 

Thanks

[This message has been edited by moderator to mask url]

Hi Dhruv,

we tried with Aashish the solution you mentioned above but this new connection doesn't work too.

We are waiting for a possible solution.

Thanks.

Hi @Aashish-Handa @bruno 

The screenshot you have shared above is showing "Enrollment is completed" which means O365 connection is setup successfully. 

You can use the O365 connection which you have enrolled above. Please let me know the issue you are facing now. 

Regards,

Dhruv Sharma

Aashish-Handa
Regular Contributor
Regular Contributor

Hi @Dhruv_Sharma ,

How does this enrollment help me? 

On the Design module, when I tried testing the connection, I received a Connection Failed message only.

What I currently see on DEV are 2 new connections made for my app, Office_CN which are completely blank. Also the external connection is supposed to be using Office_365 connector type which here in this case is using REST.

AashishHanda_0-1706590360861.png

Thanks

Hi @Aashish-Handa 

We are looking into it and update you on this. 

Regards,

Dhruv Sharma

Hi @Aashish-Handa 

We have created a ticket INC-2016879 for the same. Could you please share the details -error screenshots, logs and config screenshots on the same. We will troubleshoot the issue further on this ticket. If there is any bug or issue, we will update you on the same ticket.

Also, please let us know if there are any specific use cases which you are looking here with OOTB connector which you are unable to achieve using the REST Connector.

Regards,

Dhruv Sharma