Skip to content

Commit 04fafc9

Browse files
Initial Readme
Initial readme that describes the project and how to use it.
1 parent e2151d1 commit 04fafc9

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed

Readme.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
[![Unit Test](https://github.com/Moot-Inc/ObjectID-Converter/actions/workflows/Unit-Test.yml/badge.svg)](https://github.com/Moot-Inc/ObjectID-Converter/actions/workflows/Unit-Test.yml)
2+
[![Lint Check](https://github.com/Moot-Inc/ObjectID-Converter/actions/workflows/Lint.yml/badge.svg)](https://github.com/Moot-Inc/ObjectID-Converter/actions/workflows/Lint.yml)
3+
[![CodeQL](https://github.com/Moot-Inc/ObjectID-Converter/actions/workflows/SAST.yml/badge.svg)](https://github.com/Moot-Inc/ObjectID-Converter/actions/workflows/SAST.yml)
4+
5+
# ObjectID Converter
6+
7+
This project is a TypeScript native implementation of the Microsoft's cloud Object ID to Security Identifier (SID) process.
8+
9+
This project is not compatible with Windows Server Active Directory Object ID to SID conversions.
10+
11+
Inspiration for this project:
12+
<https://oliverkieselbach.com/2020/05/13/powershell-helpers-to-convert-azure-ad-object-ids-and-sids/>
13+
14+
## Convert Object ID to SID
15+
16+
To convert your Object ID to a SID, use the `convertToSid()` function. It has only one parameter, the ObjectID, it takes a UUIDv4 format string then converts it to an Entra ID SID.
17+
18+
``` TypeScript
19+
import { convertToSid } from 'ObjectID-Converter';
20+
21+
/** Object ID that will be converted to a SID. */
22+
const objectId = 'f82d79af-1278-4894-ac01-d90e30875cf8';
23+
24+
/** SID that was converted from an Object ID */
25+
const results = convertToSid(objectId);
26+
27+
// Render the results on the JavaScript Console.
28+
console.log(results);
29+
```
30+
31+
Results:
32+
33+
``` text
34+
S-1-12-1-4163729839-1217663608-249102764-4166813488
35+
```
36+
37+
## Convert SID to Object ID
38+
39+
Coming soon!

0 commit comments

Comments
 (0)