ConfigureCrmServerSideSync - Date comparison for checking for expired certs is not correct

Open Beginner friendly
#797 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
74/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Quiet
Tech stack
powershell
Domain
security

Research direction

Start in powershell/ServerSideSync/ConfigureCrmServerSideSync.ps1 at the linked check around lines 175-188. Inspect how $servicePrincipalCredentials[$i].endDateTime and $currentDateTime are compared, then verify that expired certificates are detected correctly when the check runs.

Written by the indexing model from the issue text.

Description

PowerShell

https://github.com/microsoft/PowerApps-Samples/blob/a6d30c10d17938fbeb85245e57a4a2cb435c71c8/powershell/ServerSideSync/ConfigureCrmServerSideSync.ps1#L188

The check on line 175 is not evaluated correctly as $servicePrincipalCredentials[$i].endDateTime is a string and $currentDateTime is a DateTime.

Dominant language
C#
Stars
2k
Forks
1.8k
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from microsoft/PowerApps-Samples

All issues in microsoft/PowerApps-Samples

Similar issues

More C# issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.