You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Sep 3, 2025. It is now read-only.
Copy file name to clipboardExpand all lines: CHANGELOG.md
+12Lines changed: 12 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,3 +1,15 @@
1
+
## v0.67.0 (Unreleased)
2
+
3
+
- Support for PIM Role Management [Policies](https://learn.microsoft.com/en-us/graph/api/resources/unifiedrolemanagementpolicy?view=graph-rest-1.0), [Rules](https://learn.microsoft.com/en-us/graph/api/resources/unifiedrolemanagementpolicyrule?view=graph-rest-1.0), and [Assignments](https://learn.microsoft.com/en-us/graph/api/resources/unifiedrolemanagementpolicyassignment?view=graph-rest-1.0) ([#277](https://github.com/manicminer/hamilton/pull/277))
4
+
- Support for PIM Group Eligibility [Schedules](https://learn.microsoft.com/en-us/graph/api/resources/unifiedroleeligibilityschedule?view=graph-rest-1.0), [Instances](https://learn.microsoft.com/en-us/graph/api/resources/unifiedroleeligibilityscheduleinstance?view=graph-rest-1.0), and [Requests](https://learn.microsoft.com/en-us/graph/api/resources/unifiedroleeligibilityschedulerequest?view=graph-rest-1.0) ([#277](https://github.com/manicminer/hamilton/pull/277))
5
+
- Support for PIM Group Assignment [Schedules]([https://learn.microsoft.com/en-us/graph/api/resources/unifiedroleeligibilityschedule?view=graph-rest-1.0](https://learn.microsoft.com/en-us/graph/api/resources/privilegedaccessgroupassignmentschedule?view=graph-rest-1.0)), [Instances]([https://learn.microsoft.com/en-us/graph/api/resources/unifiedroleeligibilityscheduleinstance?view=graph-rest-1.0](https://learn.microsoft.com/en-us/graph/api/resources/privilegedaccessgroupassignmentscheduleinstance?view=graph-rest-1.0)), and [Requests]([https://learn.microsoft.com/en-us/graph/api/resources/unifiedroleeligibilityschedulerequest?view=graph-rest-1.0](https://learn.microsoft.com/en-us/graph/api/resources/privilegedaccessgroupassignmentschedulerequest?view=graph-rest-1.0)) ([#277](https://github.com/manicminer/hamilton/pull/277))
6
+
- Support for the `ApplicationFilter` field in the `ConditionalAccessApplications` model ([#268](https://github.com/manicminer/hamilton/pull/268))
7
+
- Added `SkipExchangeInstantOn` to supported `msgraph.GroupResourceBehaviorOption` values ([#275](https://github.com/manicminer/hamilton/pull/275))
8
+
9
+
⚠️ BREAKING CHANGES:
10
+
11
+
-`ExpirationPatternDuration` has changed from a `*time.Duration` to a `*string` ([#276](https://github.com/manicminer/hamilton/pull/277))
12
+
1
13
## v0.66.0 (January 25, 2024)
2
14
3
15
- This is a maintenance release to update to the latest published module for `github.com/hashicorp/go-azure-sdk/sdk` ([#272](https://github.com/manicminer/hamilton/pull/272))
Copy file name to clipboardExpand all lines: README.md
+56-4Lines changed: 56 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -131,22 +131,74 @@ Please raise a pull request [on GitHub][gh-project] to submit contributions. Bug
131
131
132
132
## Testing
133
133
134
-
Testing requires an Azure AD tenant and real credentials. Note that some tests require an Azure AD Premium P2 license and/or an Office 365 license.
135
-
You can authenticate with any supported method for the client tests, and the auth tests are split by authentication method.
134
+
Testing requires at least one Azure AD tenant and real credentials.
135
+
136
+
Note that running all tests requires three separate tenants, and that some tests require an Azure AD Premium P2 license and/or an Office 365 license.
137
+
138
+
> ℹ️ You can sign up for the [Microsoft 365 Developer Program](https://developer.microsoft.com/en-us/microsoft-365/dev-program) which offers a Microsoft 365 E5 subscription for 25 users, at no cost for development purposes. That will suffice for most tests.
136
139
137
-
> ℹ️ You can sign up for the [Microsoft 365 Developer Program](https://developer.microsoft.com/en-us/microsoft-365/dev-program) which offers a Microsoft 365 E5 subscription for 25 users, at no cost for development purposes.
140
+
It's recommended to use an isolated tenant for testing and _not_ a production tenant.
141
+
142
+
You can authenticate with any supported method for the client tests, and the auth tests are split by authentication method.
138
143
139
144
Note that each client generally has a single test that exercises all methods. This is to help ensure that test objects
140
145
are cleaned up where possible. Where tests fail, often objects will be left behind and should be cleaned up separately.
141
146
The [test-cleanup](https://github.com/manicminer/hamilton/tree/main/internal/cmd/test-cleanup) command can be used to
142
147
delete leftover test objects in the event of test failure.
143
148
144
-
It's recommended to use an isolated tenant for testing and _not_ a production tenant.
149
+
### Configuring single-tenant tests (eg. with a no-cost subscription from Microsoft 365 Developer Program)
150
+
To set up environment variables:
151
+
```shell
152
+
az login --allow-no-subscriptions
153
+
154
+
# create one in the Azure Portal -> Entra ID -> App registrations -> New Registration
155
+
# set "hamilton" as name, accept other defaults. Then copy Essentials -> Application (client) ID
156
+
export CLIENT_ID=...
157
+
# find this on the Azure Portal -> Entra ID -> Basic Information -> Tenant ID
158
+
export TENANT_ID=...
159
+
# find this on the Azure Portal -> Entra ID -> Basic Information -> Primary domain
160
+
export TENANT_DOMAIN=...
161
+
162
+
export DEFAULT_TENANT_ID=${TENANT_ID}
163
+
export DEFAULT_TENANT_DOMAIN=${TENANT_DOMAIN}
164
+
export CONNECTED_TENANT_ID=${TENANT_ID}
165
+
export CONNECTED_TENANT_DOMAIN=${TENANT_DOMAIN}
166
+
export B2C_TENANT_ID=${TENANT_ID}
167
+
export B2C_TENANT_DOMAIN=${TENANT_DOMAIN}
168
+
```
169
+
170
+
To run one test (eg. `TestUsersClient`):
171
+
```shell
172
+
go test --race '-run=^TestUsersClient$' ./...
173
+
```
174
+
175
+
176
+
### Configuring and running all tests
177
+
To set up environment variables:
178
+
```shell
179
+
az login
180
+
181
+
# find this on the Azure Portal -> Entra ID -> Basic Information -> Tenant ID
182
+
export DEFAULT_TENANT_ID=...
183
+
# find this on the Azure Portal -> Entra ID -> Basic Information -> Primary domain
184
+
export DEFAULT_TENANT_DOMAIN=...
185
+
186
+
# same as above, but from a separate tenant, to run TestConnectedOrganizationClient
187
+
export CONNECTED_TENANT_ID=...
188
+
export CONNECTED_TENANT_DOMAIN=${TENANT_DOMAIN}
189
+
190
+
# same as above, but from yet another separate tenant, to run TestB2CUserFlowClient
191
+
export B2C_TENANT_ID=${TENANT_ID}
192
+
export B2C_TENANT_DOMAIN=${TENANT_DOMAIN}
193
+
```
194
+
195
+
> ℹ️ View all supported environment variables in the [`envDefault()` testing helper function](https://github.com/manicminer/hamilton/blob/main/internal/test/testing.go).
0 commit comments