-
Notifications
You must be signed in to change notification settings - Fork 168
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
New-MgAgreement cmdlet fails with value cannot be null - parameter name source #652
Milestone
Comments
Thanks for the repro. This does indeed look like a bug with how this command serializes As a workaround, I'd recommend you use |
Thank you @peombwa 👯 |
This is now supported by the command: $data = @{
DisplayName = "Contoso ToU for guest users"
IsViewingBeforeAcceptanceRequired = $true
Files = @(
@{
FileName = "TOU.pdf"
Language = "en"
IsDefault = $true
FileData = @{
Data = [System.IO.File]::ReadAllBytes("PATH_TO_FILE.pdf")
}
}
)
}
New-MgAgreement -BodyParameter $data -Debug See the example at https://docs.microsoft.com/en-us/graph/api/termsofusecontainer-post-agreements?view=graph-rest-beta&tabs=powershell. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When using the
New-MgAgreement
cmdlet to create a terms of use file - running the command returns "value cannot be null - parameter name source". Adding a "source" parameter to the New-MgAgreement cmdlet returns tells me "a parameter cannot be found that matches parameter name 'source' - which is correct per the documentation.This issue was first reported on Stack Overflow
See below screenshot with details:
AB#9286
The text was updated successfully, but these errors were encountered: