Skip to content

Add AccessToken Authentication#234

Open
ThomasKur wants to merge 8 commits into
MSEndpointMgr:masterfrom
ThomasKur:master
Open

Add AccessToken Authentication#234
ThomasKur wants to merge 8 commits into
MSEndpointMgr:masterfrom
ThomasKur:master

Conversation

@ThomasKur

Copy link
Copy Markdown

This can be leveraged for example in DevOps Pipelines where a Service connection already has the required access.

This solves as well: #114

Copilot AI review requested due to automatic review settings June 26, 2026 13:33
@ThomasKur

Copy link
Copy Markdown
Author

@NickolajA happy if you can integrate it! Cool solution!

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds support for authenticating the module using a pre-acquired Microsoft Graph access token (e.g., from CI/CD service connections), addressing the request in issue #114 while keeping module authentication state initialization consistent.

Changes:

  • Added an -AccessToken parameter set to Connect-MSIntuneGraph, including optional -ExpiresOn for tokens where expiry can’t be derived.
  • Updated README and sample script to document and demonstrate reusing an existing access token.
  • Updated release notes to include the new AccessToken support.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

File Description
Samples/1-Overview.ps1 Adds an example showing how to connect using an existing access token.
ReleaseNotes.md Notes the addition of AccessToken support in Connect-MSIntuneGraph.
README.md Documents the new “Existing Access Token” usage pattern.
Public/Connect-MSIntuneGraph.ps1 Implements the new AccessToken parameter set, token normalization, and ExpiresOn handling.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread Public/Connect-MSIntuneGraph.ps1
Comment thread Public/Connect-MSIntuneGraph.ps1
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants