Commit Graph
3 Commits
Author SHA1 Message Date
Sakshyam Shah 67757a9fe2 refactor: move msgraph models to models package (#65871)
* refactor: move msgraph models from /lib/msgraph to /lib/msgraph/models package

* test: use msgraphtest server to test TestIterateUsers_Empty

* add comments to exported types

* lint: fix import cadence

* test: DecodeGroupMember

* test: add license header
2026-04-17 17:48:57 +00:00
Rafał Cieślak 07ee5ba23c lib/msgraph: Add auth error handling, logging, and Client-Request-Id header (#58661)
* Capture status code in GraphError

* Add comments to GraphError fields

* Parse auth errors returned by AzureTokenProvider

* Update tests to use NewClient

* Add logging to lib/msgraph.Client

* Add client-request-id header

* Fix typos in api/types.ValidateMSGraphEndpoints

* Ignore StatusCode field during unmarshalling

* Check for `authFailedError.RawResponse.Body != nil`

* Move credential verification from e/lib/intune to lib/msgraph

* Remove request logging
2025-09-09 08:48:53 +00:00
Justinas Stankevičius c5a5f8e7a2 Replace MS Graph SDK with an in-house client (#44069)
* Add MS Graph client skeleton

* Complete retry logic

* Add GetID() to GroupMember

* Parse MS Graph API error responses

* Pull out page size into config

* Add missing "patch" methods to client interface

* Move code around

* Factor out roundtrip()

* Fill out remaining methods

* Add godocs and solve lints

* Run gci

* Move godocs to the interface

* Add missing method

* Finish errors_test

* close body in test

* nit

* Add license headers

* Move azureoidc onboarding code to msgraph.Client

* Make AzureTokenProvider public

* Use cmp.Or to shorten config defaults handling

* Address review nits

* Parallelize tests

* nit

* Respect context cancellation in retry logic

* Utilize BlockUntil in tests

* Remove Client interface, make client struct public

* Prefer defaults.HTTPClient to http.DefaultClient

* Iterate entra apps, do not buffer all in memory

* nit

* Set additional timeouts on default HTTP client

* Escape path segments when constructing URLs

* Add a general timeout for default HTTP client
2024-07-17 15:51:39 +00:00