0

I've been trying to find in Microsoft documentation (learn.microsoft.com) format specifications for the ClientID, the ClientSecret and the TenantID in order to connect to SharePoint REST API v1.

I am simply trying to validate format with regex in C# for each of them. I would have expect Microsoft to provide at least an explanation for those in the documentation, but can't manage to find anything about it.

I don't need a specific regex for each or code examples, I simply need the format specifications.

As an example, something like :

CliendID : alphanumerical string of 12 characters separated by dashes -> xyz-xyz-yzx-xyz
CliendSecret : ...
TenantID : ...

Found this ticket online, but still inconclusive : https://learn.microsoft.com/en-us/answers/questions/263677/validating-client-and-tenant-id-using-regular-expr

Thanks a lot

user2250152
  • 14,658
  • 4
  • 33
  • 57
matreurai
  • 147
  • 12

1 Answers1

0

This is a very niche thing that 99.99% of people don't need to do, which is why it's not in the learn.microsoft.com documentation. I presume this would be useful only in CI/CD pipelines. You can use regex builders, but I think the likely situation is that this is unnecessary; if you are building a CI/CD pipeline, it should either work or fail outright; it shouldn't give you malformed information. I appreciate this might not be the answer you're looking for, but I recommend reconsidering if this is a good use of your time.

Zain
  • 1,246
  • 4
  • 15
  • 26