-
Notifications
You must be signed in to change notification settings - Fork 351
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
[FEATURE] Environment Variable Rename [ENTRAID_APP_ID] #4234
Comments
To add to this one.. Most of our developers are working across dozens of tenants at any given time. It would even better if we could add tenant specific client IDs to the environment variables. Otherwise I have to keep track of them somewhere and constantly be looking up the IDs when switching between tenants. |
I think if no -ClientID parameter is passed, and the ENTRAID_APP_ID environment variable is not defined, Connect-PnPOnline should look for an environment variable, or maybe a stored credential called host_ENTRAID_APP_ID and try that. So if I'm trying to connect to contoso.sharepoint.com then Connect-PnPOnline would look for contoso.sharepoint.com_ENTRAID_APP_ID, much like it looks now for stored credentials. |
Like @ToddKlindt I'm one who constantly switches between two (sometimes more) Tenants. So, having a single ClientID as an environment variable is a bit of a hassle. I always forget to change the value, and then I keep looking uncomprehendingly at the error page. This is currently impeding me quite a bit. TBH it feels like this change was rushed a bit and not well thought through. |
Hello all, Please checkout these new cmdlets that we added in the nightly builds. Should help ease this issue, would love to hear your feedback on this. https://pnp.github.io/powershell/cmdlets/Set-PnPManagedAppId.html https://pnp.github.io/powershell/cmdlets/Get-PnPManagedAppId.html https://pnp.github.io/powershell/cmdlets/Remove-PnPManagedAppId.html |
@gautamdsheth this is a great addition, thanks! One small thing I noticed, though, is that when adding a subdomain, it doesn't automatically work for the -admin site collection, so in order to add a tenant to ENV variables we have to run Set-PnPManagedAppId twice (once for tenant.sharepoint.com and another for tenant-admin.sharepoint.com). Would it be possible for the code to respect the single App ID for both variations of the subdomain? Thanks again! |
Not exactly the fix you're looking for, but I almost never connect to the -admin site. All the commands I use that need -admin automatically connect there regardless of where I am actually connected. Because of that I always connect to https://contoso, which would grab the ClientID. |
This look great. I can't wait to try it out! |
Is your feature request related to a problem? Please describe.
No
Describe the solution you'd like
Would like the client ID environment variable renamed. "ENTRAID_APP_ID" is not specific to this app and since this is a system wide variable, it should have a proper name.
For example:
PNPPOWERSHELL_CLIENTID (PNPPOWERSHELL_ is an already used prefix)
PnPClientId
PnPInteractiveClientId
Describe alternatives you've considered
n/a
Additional context
Related to new client ID process and single tenant app for interactive connections.
The text was updated successfully, but these errors were encountered: