Skip to content

Add support for Federated Identity Credentials in connection methods and parameters #4870

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: dev
Choose a base branch
from

Conversation

gautamdsheth
Copy link
Collaborator

Before creating a pull request, make sure that you have read the contribution file located at

https://github.com/pnp/powerShell/blob/dev/CONTRIBUTING.md

Type

  • Bug Fix
  • New Feature
  • Sample

Related Issues?

Fixes #X, partially fixes #Y, mentioned in #Z, etc.

What is in this Pull Request ?

Please describe the changes in the PR.

Guidance

  • You can delete this section when you are submitting the pull request.*
  • Please update this PR information accordingly. We use this as part of our release notes in monthly communications.
  • Please target your PR to Dev branch. If you do not target the Dev branch we will not accept this PR.

@gautamdsheth
Copy link
Collaborator Author

Hey @reshmee011 , any chance you might be able to test out this auth mode ? Just saw you do some interesting stuff in this area and was wondering if you might be able to help here with the FIC approach, no pressure 😊
Appreciate any help in this.

@reshmee011
Copy link
Contributor

@gautamdsheth : that's a very cool addition/feature. I will try to spare some time over the weekend to test it. Thanks so much to make the product better.

@gautamdsheth gautamdsheth requested a review from Copilot May 3, 2025 18:23
Copy link

@Copilot Copilot AI left a comment

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 Federated Identity Credentials as a new connection method across the codebase, including model enums, connection creation methods, cmdlet parameters, and documentation. Key changes include:

  • Adding FederatedIdentityCredentials in ConnectionMethod and InitializationType enums.
  • Implementing a new PnPConnection.CreateWithFederatedIdentityCredentials method and updating ConnectOnline to support this connection method.
  • Updating documentation and parameter set definitions in ConnectOnline to reflect the new federated identity options.

Reviewed Changes

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

Show a summary per file
File Description
src/Commands/Model/ConnectionMethod.cs Added new enum value for FederatedIdentityCredentials.
src/Commands/Enums/InitializationType.cs Included FederatedIdentityCredentials in InitializationType enum.
src/Commands/Base/PnPConnection.cs Added CreateWithFederatedIdentityCredentials and adjusted auth manager usage.
src/Commands/Base/ConnectOnline.cs Added new parameter sets and connection logic for Federated Identity Credentials.
documentation/Connect-PnPOnline.md Updated examples and parameter documentation for Federated Identity Credentials.
Comments suppressed due to low confidence (1)

src/Commands/Base/ConnectOnline.cs:973

  • Consider adding unit tests for the new Federated Identity Credentials validation logic to verify that an exception is thrown when no identity parameter is specified.
if (!ParameterSpecified(nameof(UserAssignedManagedIdentityClientId)) &&

@@ -289,6 +304,13 @@ Connect to SharePoint using Credentials (username and password) from Credential

On Windows, this entry needs to be under "Generic Credentials".

### EXAMPLE 20
Copy link
Preview

Copilot AI May 3, 2025

Choose a reason for hiding this comment

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

[nitpick] Ensure that the documentation examples remain consistent with the updated parameter sets for Federated Identity Credentials and clearly demonstrate their usage.

Copilot uses AI. Check for mistakes.

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.

2 participants