Skip to content

Commit afd51f1

Browse files
authored
Merge pull request #280 from bepsoccer/release
Adds MFA code management functions
2 parents 88ca6bf + 3bb14dd commit afd51f1

7 files changed

Lines changed: 611 additions & 35 deletions

File tree

Lines changed: 174 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,174 @@
1+
---
2+
external help file: verkadaModule-help.xml
3+
Module Name: verkadaModule
4+
online version: https://github.com/bepsoccer/verkadaModule/blob/master/docs/function-documentation/Add-VerkadaAccessMfaCode.md
5+
schema: 2.0.0
6+
---
7+
8+
# Add-VerkadaAccessUserMfaCode
9+
10+
## SYNOPSIS
11+
Adds a mfa code credential to a user using https://apidocs.verkada.com/reference/postmfacodeviewv1
12+
13+
## SYNTAX
14+
15+
```
16+
Add-VerkadaAccessUserMfaCode [[-userId] <String>] [[-externalId] <String>] [[-mfaCode] <String>]
17+
[[-org_id] <String>] [[-x_verkada_auth_api] <String>] [[-region] <String>] [-errorsToFile]
18+
[-ProgressAction <ActionPreference>] [<CommonParameters>]
19+
```
20+
21+
## DESCRIPTION
22+
Adds a mfa code credential to a user given a specified user_id or external_id and org_id.
23+
MFA code object will be passed in the body of the request as a json.
24+
The org_id and reqired token can be directly submitted as parameters, but is much easier to use Connect-Verkada to cache this information ahead of time and for subsequent commands.
25+
26+
## EXAMPLES
27+
28+
### EXAMPLE 1
29+
```
30+
Add-VerkadaAccessUserMfaCode -mfaCode '9567' -userId '801c9551-b04c-4293-84ad-b0a6aa0588b3'
31+
This adds the MFA code 9567 to the Access user's profile with userId 801c9551-b04c-4293-84ad-b0a6aa0588b3. The org_id and token will be populated from the cached created by Connect-Verkada.
32+
```
33+
34+
### EXAMPLE 2
35+
```
36+
Add-VerkadaAccessUserMfaCode -mfaCode '9567' -externalId 'newUserUPN@contoso.com' -org_id '7cd47706-f51b-4419-8675-3b9f0ce7c12d' -x_verkada_auth_api 'sd78ds-uuid-of-verkada-token'
37+
This adds the MFA code 9567 to the Access user's profile with externalId newUserUPN@contoso.com. The org_id and token are submitted as parameters in the call.
38+
```
39+
40+
## PARAMETERS
41+
42+
### -userId
43+
The UUID of the user
44+
45+
```yaml
46+
Type: String
47+
Parameter Sets: (All)
48+
Aliases: user_id
49+
50+
Required: False
51+
Position: 1
52+
Default value: None
53+
Accept pipeline input: True (ByPropertyName)
54+
Accept wildcard characters: False
55+
```
56+
57+
### -externalId
58+
unique identifier managed externally provided by the consumer
59+
60+
```yaml
61+
Type: String
62+
Parameter Sets: (All)
63+
Aliases: external_id
64+
65+
Required: False
66+
Position: 2
67+
Default value: None
68+
Accept pipeline input: True (ByPropertyName)
69+
Accept wildcard characters: False
70+
```
71+
72+
### -mfaCode
73+
The Access MFA code
74+
75+
```yaml
76+
Type: String
77+
Parameter Sets: (All)
78+
Aliases: mfa_code, code
79+
80+
Required: False
81+
Position: 3
82+
Default value: None
83+
Accept pipeline input: True (ByPropertyName)
84+
Accept wildcard characters: False
85+
```
86+
87+
### -org_id
88+
The UUID of the organization the user belongs to
89+
90+
```yaml
91+
Type: String
92+
Parameter Sets: (All)
93+
Aliases:
94+
95+
Required: False
96+
Position: 4
97+
Default value: $Global:verkadaConnection.org_id
98+
Accept pipeline input: True (ByPropertyName)
99+
Accept wildcard characters: False
100+
```
101+
102+
### -x_verkada_auth_api
103+
The public API token obatined via the Login endpoint to be used for calls that hit the public API gateway
104+
105+
```yaml
106+
Type: String
107+
Parameter Sets: (All)
108+
Aliases:
109+
110+
Required: False
111+
Position: 5
112+
Default value: $Global:verkadaConnection.x_verkada_auth_api
113+
Accept pipeline input: False
114+
Accept wildcard characters: False
115+
```
116+
117+
### -region
118+
The region of the public API to be used
119+
120+
```yaml
121+
Type: String
122+
Parameter Sets: (All)
123+
Aliases:
124+
125+
Required: False
126+
Position: 6
127+
Default value: Api
128+
Accept pipeline input: False
129+
Accept wildcard characters: False
130+
```
131+
132+
### -errorsToFile
133+
Switch to write errors to file
134+
135+
```yaml
136+
Type: SwitchParameter
137+
Parameter Sets: (All)
138+
Aliases:
139+
140+
Required: False
141+
Position: Named
142+
Default value: False
143+
Accept pipeline input: False
144+
Accept wildcard characters: False
145+
```
146+
147+
### -ProgressAction
148+
{{ Fill ProgressAction Description }}
149+
150+
```yaml
151+
Type: ActionPreference
152+
Parameter Sets: (All)
153+
Aliases: proga
154+
155+
Required: False
156+
Position: Named
157+
Default value: None
158+
Accept pipeline input: False
159+
Accept wildcard characters: False
160+
```
161+
162+
### CommonParameters
163+
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
164+
165+
## INPUTS
166+
167+
## OUTPUTS
168+
169+
## NOTES
170+
171+
## RELATED LINKS
172+
173+
[https://github.com/bepsoccer/verkadaModule/blob/master/docs/function-documentation/Add-VerkadaAccessMfaCode.md](https://github.com/bepsoccer/verkadaModule/blob/master/docs/function-documentation/Add-VerkadaAccessMfaCode.md)
174+
Lines changed: 173 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,173 @@
1+
---
2+
external help file: verkadaModule-help.xml
3+
Module Name: verkadaModule
4+
online version: https://github.com/bepsoccer/verkadaModule/blob/master/docs/function-documentation/Remove-VerkadaAccessMfaCode.md
5+
schema: 2.0.0
6+
---
7+
8+
# Remove-VerkadaAccessUserMfaCode
9+
10+
## SYNOPSIS
11+
Deletes a mfa code credential from a specified user using https://apidocs.verkada.com/reference/deletemfacodeviewv1
12+
13+
## SYNTAX
14+
15+
```
16+
Remove-VerkadaAccessUserMfaCode [[-userId] <String>] [[-externalId] <String>] [[-mfaCode] <String>]
17+
[[-org_id] <String>] [[-x_verkada_auth_api] <String>] [[-region] <String>] [-errorsToFile]
18+
[-ProgressAction <ActionPreference>] [<CommonParameters>]
19+
```
20+
21+
## DESCRIPTION
22+
Deletes a mfa code credential from a specified user by providing the user_id or the external_id, the org_id, and the mfa_code.
23+
The org_id and reqired token can be directly submitted as parameters, but is much easier to use Connect-Verkada to cache this information ahead of time and for subsequent commands.
24+
25+
## EXAMPLES
26+
27+
### EXAMPLE 1
28+
```
29+
Remove-VerkadaAccessUserMfaCode -mfaCode '9567' -userId '801c9551-b04c-4293-84ad-b0a6aa0588b3'
30+
This deletes the MFA code 9567 from the Access user's profile with userId 801c9551-b04c-4293-84ad-b0a6aa0588b3. The org_id and token will be populated from the cached created by Connect-Verkada.
31+
```
32+
33+
### EXAMPLE 2
34+
```
35+
Remove-VerkadaAccessUserMfaCode -mfaCode '9567' -externalId 'newUserUPN@contoso.com' -org_id '7cd47706-f51b-4419-8675-3b9f0ce7c12d' -x_verkada_auth_api 'sd78ds-uuid-of-verkada-token'
36+
This deletes the MFA code 9567 from the Access user's profile with externalId newUserUPN@contoso.com. The org_id and token are submitted as parameters in the call.
37+
```
38+
39+
## PARAMETERS
40+
41+
### -userId
42+
The UUID of the user
43+
44+
```yaml
45+
Type: String
46+
Parameter Sets: (All)
47+
Aliases: user_id
48+
49+
Required: False
50+
Position: 1
51+
Default value: None
52+
Accept pipeline input: True (ByPropertyName)
53+
Accept wildcard characters: False
54+
```
55+
56+
### -externalId
57+
unique identifier managed externally provided by the consumer
58+
59+
```yaml
60+
Type: String
61+
Parameter Sets: (All)
62+
Aliases: external_id
63+
64+
Required: False
65+
Position: 2
66+
Default value: None
67+
Accept pipeline input: True (ByPropertyName)
68+
Accept wildcard characters: False
69+
```
70+
71+
### -mfaCode
72+
The Access MFA code
73+
74+
```yaml
75+
Type: String
76+
Parameter Sets: (All)
77+
Aliases: mfa_code
78+
79+
Required: False
80+
Position: 3
81+
Default value: None
82+
Accept pipeline input: True (ByPropertyName)
83+
Accept wildcard characters: False
84+
```
85+
86+
### -org_id
87+
The UUID of the organization the user belongs to
88+
89+
```yaml
90+
Type: String
91+
Parameter Sets: (All)
92+
Aliases:
93+
94+
Required: False
95+
Position: 4
96+
Default value: $Global:verkadaConnection.org_id
97+
Accept pipeline input: True (ByPropertyName)
98+
Accept wildcard characters: False
99+
```
100+
101+
### -x_verkada_auth_api
102+
The public API token obatined via the Login endpoint to be used for calls that hit the public API gateway
103+
104+
```yaml
105+
Type: String
106+
Parameter Sets: (All)
107+
Aliases:
108+
109+
Required: False
110+
Position: 5
111+
Default value: $Global:verkadaConnection.x_verkada_auth_api
112+
Accept pipeline input: False
113+
Accept wildcard characters: False
114+
```
115+
116+
### -region
117+
The region of the public API to be used
118+
119+
```yaml
120+
Type: String
121+
Parameter Sets: (All)
122+
Aliases:
123+
124+
Required: False
125+
Position: 6
126+
Default value: Api
127+
Accept pipeline input: False
128+
Accept wildcard characters: False
129+
```
130+
131+
### -errorsToFile
132+
Switch to write errors to file
133+
134+
```yaml
135+
Type: SwitchParameter
136+
Parameter Sets: (All)
137+
Aliases:
138+
139+
Required: False
140+
Position: Named
141+
Default value: False
142+
Accept pipeline input: False
143+
Accept wildcard characters: False
144+
```
145+
146+
### -ProgressAction
147+
{{ Fill ProgressAction Description }}
148+
149+
```yaml
150+
Type: ActionPreference
151+
Parameter Sets: (All)
152+
Aliases: proga
153+
154+
Required: False
155+
Position: Named
156+
Default value: None
157+
Accept pipeline input: False
158+
Accept wildcard characters: False
159+
```
160+
161+
### CommonParameters
162+
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
163+
164+
## INPUTS
165+
166+
## OUTPUTS
167+
168+
## NOTES
169+
170+
## RELATED LINKS
171+
172+
[https://github.com/bepsoccer/verkadaModule/blob/master/docs/function-documentation/Remove-VerkadaAccessMfaCode.md](https://github.com/bepsoccer/verkadaModule/blob/master/docs/function-documentation/Remove-VerkadaAccessMfaCode.md)
173+

docs/reference.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
* [Add-VerkadaAccessSiteAdmin](function-documentation/Add-VerkadaAccessSiteAdmin.md)
55
* [Add-VerkadaAccessUserCard](function-documentation/Add-VerkadaAccessUserCard.md)
66
* [Add-VerkadaAccessUserLicensePlate](function-documentation/Add-VerkadaAccessUserLicensePlate.md)
7+
* [Add-VerkadaAccessUserMfaCode](function-documentation/Add-VerkadaAccessUserMfaCode.md)
78
* [Add-VerkadaCamera](function-documentation/Add-VerkadaCamera.md)
89
* [Add-VerkadaCommandSite](function-documentation/Add-VerkadaCommandSite.md)
910
* [Add-VerkadaCommandUser](function-documentation/Add-VerkadaCommandUser.md)
@@ -58,6 +59,7 @@
5859
* [Remove-VerkadaAccessUserEntryCode](function-documentation/Remove-VerkadaAccessUserEntryCode.md)
5960
* [Remove-VerkadaAccessUserFromGroup](function-documentation/Remove-VerkadaAccessUserFromGroup.md)
6061
* [Remove-VerkadaAccessUserLicensePlate](function-documentation/Remove-VerkadaAccessUserLicensePlate.md)
62+
* [Remove-VerkadaAccessUserMfaCode](function-documentation/Remove-VerkadaAccessUserMfaCode.md)
6163
* [Remove-VerkadaAccessUserProfilePicture](function-documentation/Remove-VerkadaAccessUserProfilePicture.md)
6264
* [Remove-VerkadaAccessUserRemoteUnlock](function-documentation/Remove-VerkadaAccessUserRemoteUnlock.md)
6365
* [Remove-VerkadaCameraArchive](function-documentation/Remove-VerkadaCameraArchive.md)

0 commit comments

Comments
 (0)