autographps-sdk

0.26.1

PowerShell SDK for Microsoft Graph automation

Minimum PowerShell version

5.1

Installation Options

Copy and Paste the following command to install this package using PowerShellGet More Info

Install-Module -Name autographps-sdk -RequiredVersion 0.26.1

Copy and Paste the following command to install this package using Microsoft.PowerShell.PSResourceGet More Info

Install-PSResource -Name autographps-sdk -Version 0.26.1

You can deploy this package directly to Azure Automation. Note that deploying packages with dependencies will deploy all the dependencies to Azure Automation. Learn More

Manually download the .nupkg file to your system's default download location. Note that the file won't be unpacked, and won't include any dependencies. Learn More

Owners

Copyright

(c) 2021 Adam Edwards.

Package Details

Author(s)

  • Adam Edwards

Tags

MSGraph Graph AADGraph Azure MicrosoftGraph Microsoft-Graph MS-Graph AAD-Graph REST CRUD GraphAPI poshgraph poshgraph-sdk autograph Windows Linux MacOS

Functions

Clear-GraphLog Connect-GraphApi Disconnect-GraphApi Find-GraphLocalCertificate Format-GraphLog Get-GraphApplication Get-GraphApplicationCertificate Get-GraphApplicationConsent Get-GraphApplicationServicePrincipal Get-GraphConnection Get-GraphConnectionInfo Get-GraphError Get-GraphResource Get-GraphLog Get-GraphLogOption Get-GraphProfileSettings Get-GraphToken Invoke-GraphApiRequest New-GraphApplication New-GraphApplicationCertificate New-GraphConnection New-GraphLocalCertificate Register-GraphApplication Remove-GraphApplication Remove-GraphApplicationCertificate Remove-GraphApplicationConsent Remove-GraphConnection Remove-GraphResource Select-GraphProfileSettings Set-GraphApplicationConsent Set-GraphConnectionStatus Set-GraphLogOption Test-Graph Unregister-GraphApplication

PSEditions

Core Desktop

Dependencies

Release Notes

## AutoGraphPS-SDK 0.26.0 Release Notes

This release adds numerous usability improvements including certificate authentication improvements, profile-based configuration, and color output along with several breaking changes.

### 0.26.1 update

* Fix broken format ps1xml error that only surfaces at module update time

### New dependencies

None.

### Breaking changes

* The `Connect-GraphApi` positional parameter 0 is now the new `Name` parameter, not `Permissions`. To specify permissions, this must now requires explicit specification of the `Permissions` parameter.
* The `Invoke-GraphRequest` and `Get-GraphRequest` commands were usually paging through all results by default rather than returning some default minimum -- this has been fixed
* Some fields of `Get-GraphLog` such as `HasRequestBody` have been removed
* The output of `Get-GraphApplicationConsent` now returns `Delegated` instead of `DelegatedUser` for the `PermissionType` field
* The `AADAccountsOnly` parameter for `New-GraphApplication` has been renamed to `AllowMSAAccounts` and its semantics have been reversed to match the rename. So now by default, public client apps do not allow MSA accounts, where before they would (at least if the app was multi-tenant).

### New features

* Configuration: the module now supports "Profile settings". It reads the file `~/.autographps/settings.json` on module load if it exists and sets behaviors including the initial connection according to the settings expressed in the configuration file
* The following commands related to the proflie settings feature have been added:
 * `Get-GraphProfileSettings`
 * `Select-GraphProfileSettings`
 * `Get-GraphConnection`: enumerates 'named' connections created by `New-GraphConnection` or profile settings
 * `Remove-GraphConnection`: remove named connections
* `New-GraphConnection` supports a new `Name` parameter to assign an optional name the connection. Such connections may be enumerated by the `Get-GraphConnection` command
* `Connect-GraphApi` accepts the `Name` parameter to allow connecting using settings from a named connection
* `Connect-GraphApi` now supports the `NoProfile` parameter to ignore any default connections specified in the profile
* `New-GraphApplication` now supports specifying a password for certificates that are created in the file system
* `Connect-GraphApi` supports file-system based certificates! This is required for non-Windows operating systems like Linux or MacOS that do not support the `cert:` drive
 * The existing `CertificatePath` parameter now supports file system paths in addition to Windows certificate store paths. A path to a .pfx file may be specified on any operating system
 * The `CertCredential` parameter allows specification of the certificate password -- it is mandatory when specifying a file-system based certificate using the `CertificatePath` parameter
 * The `NoCertCredential` parameter allows the password to be skipped when the `CertificatePath` parameter is specified -- this is useful when the file-system based certificate has no password.
* Support for eventual consistency, which allows for a range of rich, complex queries in exchange for those queries missing results from more recent updates to the Graph:
 * `Connect-GraphApi` and `New-GraphConnection` expose a new `ConsistencyLevel` parameter that allows specification of consistency levels including `Eventual`
 * The `Get-GraphResource` and `Invoke-GraphApi` also expose the `ConsistencyLevel` parameter to override the setting in the connection
 * The `ConsistencyLevel` option is also configurable via the new profile settings feature as part of the connection settings
* `Get-GraphLog` output is now supported by views that can be used with `Format-Table` and `Format-List`:
 * `Format-Table`: `GraphStatus`, `GraphDebug`, `GraphTiming`, `GraphAuthentication`
 * `Format-List`" `GraphDetails`
* `Get-GraphLog` output now supports COLOR! This is supported in the default view of the output as well as the other views added by `Format-Table` and `Format-List`
* Request and response size are now part of `Get-GraphLog` output -- this is true for the default `Basic` log level
* The `Get-GraphApplicationConsent` supports the `PermissionType` parameter to optionally limit the consents to just `Delegated` or just `AppOnly` consent rather than both.
* The `Invoke-GraphRequest` and `Get-GraphResource` commands now support the `All` parameter to return all results. Without this parameter, `Invoke-GraphRequest` only returns either 100 results or the number of results contained in one REST response for the particular request URI, whichever is larger.
* The `Invoke-GraphRequest` and `Get-GraphResource` commands now support the `Count` parameter to return just the count of results that would be returned and note the results themselves. This is only supported if the request URI is backed by an API that supports this capability.
* Introduced the aliases `gcon` for `Get-GraphConnectionInfo` and `conga` for `Connect-GraphApi`

### Fixed defects

* The `CertificatePath` parameter of `New-GraphConnection` and `Connect-GraphApi` was broken -- specifying it caused an error. This has been fixed and the path to a certificate in the certificate store may now be specified.
* The `Get-GraphApplicationConsent` and other commands related to consent could fail when encountering permission id's for which no known permission name mapping could be located, possibly due to using the default snapshot of mappings rather than the most recent mappings found by reading the MS Graph service principal which requires additional access.
* The `Get-GraphApplicationConsent` and `Get-GraphApplication` commands would attempt to retrieve all consents for the given application in a tenant, but this could require a very large number of requests in a tenant with large numbers of users (e.g. 10^6) for instance. They now support the `All` parameter to retrieve all consents, but by default only returns 100-200. They also support paging with `First` and `Skip` parameters
* The `OutputFilePrefix` parameter of `Invoke-GraphApiRequest` and `Get-GraphRequest` was ignored resulting in file output with only a file extension -- this was fixed to actually use the base name.

FileList

Version History

Version Downloads Last updated
0.30.0 228 2/19/2023
0.29.0 723 12/30/2021
0.28.0 555 10/12/2021
0.27.0 551 6/13/2021
0.26.1 (current version) 465 5/5/2021
0.26.0 434 5/4/2021
0.25.0 454 2/27/2021
0.24.0 586 9/26/2020
0.23.0 390 9/26/2020
0.22.0 436 9/8/2020
0.21.1 591 6/20/2020
0.21.0 480 5/24/2020
0.20.0 788 4/19/2020
0.19.0 620 4/12/2020
0.18.0 1,161 2/8/2020
0.17.0 621 1/29/2020
0.16.0 715 11/6/2019
0.15.0 449 10/24/2019
0.14.0 413 10/23/2019
0.13.0 422 10/16/2019
0.12.0 417 10/7/2019
0.11.1 485 9/23/2019
0.11.0 397 9/20/2019
0.10.0 592 3/18/2019
0.9.0 628 2/3/2019
0.8.1 413 1/19/2019
0.8.0 411 1/13/2019
0.7.1 419 1/8/2019
0.7.0 403 1/8/2019
0.6.2 409 1/6/2019
0.6.1 406 1/5/2019
0.6.0 409 1/2/2019
0.5.1 454 10/30/2018
0.5.0 454 9/30/2018
0.4.0 428 9/15/2018
Show more