Forum Discussion
Integration, failing on createUploadSession call
Hello.
Implementing against universal print graph api.
Have so far got result for
- getting print shares using :
print/shares?$select=id,name,defaults,capabilities
- creating printer job :
print/shares/%%PrinterId%%/jobs
and now I'm stuck with createUploadSession call:
print/shares/%%PrinterId%%/jobs/%%JobId%%/documents/%%DocumentId%%/createUploadSession
Based on
{
"properties": {
"documentName": "example.pdf",
"contentType": "application/pdf",
"size": 144547
}
}
then I keep getting "UnknownError - The token does not have one or more required security scopes", i.e.
{
"error": {
"code": "UnknownError",
"message": "\"The token does not have one or more required security scopes.\"",
"innerError": {
"date": "2020-10-30T14:48:12",
"request-id": "9b6e5a98-2b38-428c-9175-335bfce3feee",
"client-request-id": "9b6e5a98-2b38-428c-9175-335bfce3feee"
}
}
}
what are those "security scopes" what it is after?
Unfortunately sample app is outdate so this doesn't even use this call. Sample app is using deprecated call
print/shares/%%PrinterId%%/jobs/%%JobId%%/documents/%%DocumentId%%/uploadData
so no hints there.
Does anyone know solution for this?
Thanks!
- elvinristiCopper Contributor
Got reply on my question in https://github.com/microsoftgraph/microsoft-graph-docs/issues/10486#issuecomment-719839157
that I would need also PrinterShare.ReadWrite.All permission. This got further from this initial error message to next - seems application/pdf is not supported :S
Unsupported document-format: application/pdf. Supported formats: Attribute document-format-supported: SimpleIppValue-Type:MimeMediaType-Value:application/oxps