You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently when I run "Add-MgServicePrincipalKey -ServicePrincipalId $spoappid -BodyParameter $params -Verbose",
it always shows error “Add-MgServicePrincipalKey : Resource '00000003-0000-0ff1-ce00-000000000000' does not exist or one of its queried reference-property objects are not present.”
In my command, $spoappid is '00000003-0000-0ff1-ce00-000000000000', while $params is $params = @{ keyCredential = @{ type = "AsymmetricX509Cert" usage = "Verify" key = [System.Text.Encoding]::ASCII.GetBytes("MIIDYDCCAki...") } passwordCredential = $null proof = "eyJ0eXAiOiJ..." }
Describe the bug
Currently when I run
"Add-MgServicePrincipalKey -ServicePrincipalId $spoappid -BodyParameter $params -Verbose"
,it always shows error “Add-MgServicePrincipalKey : Resource '00000003-0000-0ff1-ce00-000000000000' does not exist or one of its queried reference-property objects are not present.”
In my command, $spoappid is '00000003-0000-0ff1-ce00-000000000000', while $params is
$params = @{
keyCredential = @{
type = "AsymmetricX509Cert"
usage = "Verify"
key = [System.Text.Encoding]::ASCII.GetBytes("MIIDYDCCAki...")
}
passwordCredential = $null
proof = "eyJ0eXAiOiJ..."
}
According to this part in our document Configure server-to-server authentication from SharePoint Server to SharePoint in Microsoft 365,
![image](https://private-user-images.githubusercontent.com/103396968/342984229-395e525d-ac80-461f-832f-be2bbcb6e16e.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQ5Njc1MTUsIm5iZiI6MTcyNDk2NzIxNSwicGF0aCI6Ii8xMDMzOTY5NjgvMzQyOTg0MjI5LTM5NWU1MjVkLWFjODAtNDYxZi04MzJmLWJlMmJiY2I2ZTE2ZS5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwODI5JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDgyOVQyMTMzMzVaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1iZGU3YWI1YTY1NjBkZDJlYjJjOTA3NTI0ZTJkMWRmODM5ZTU4ZTM0NTUwYTg5NmFhNGJmMzE2YjFkYTBkNDIxJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.Qu8WfobjbrKTUQs_5NYtWX9fIRPhFLxHizjvN7nTfOU)
I wonder where I can find the source code of
Add-MgServicePrincipalKey
so that I can troubleshoot my error by myself?Expected behavior
This PS cmdlet can work without any errors.
How to reproduce
$spoappid="00000003-0000-0ff1-ce00-000000000000"
Import-Module Microsoft.Graph.Applications
$params = @{
keyCredential = @{
type = "AsymmetricX509Cert"
usage = "Verify"
key = [System.Text.Encoding]::ASCII.GetBytes("MIIDYDCCAki...")
}
passwordCredential = $null
proof = "eyJ0eXAiOiJ..."
}
Add-MgServicePrincipalKey -ServicePrincipalId $spoappid -BodyParameter $params
SDK Version
2.19.0
Latest version known to work for scenario above?
No response
Known Workarounds
No response
Debug output
Click to expand log
```The text was updated successfully, but these errors were encountered: