Forum Discussion
Sabbadino2
Aug 02, 2020Copper Contributor
Server side printing
Hi, I watched a video showing how to do print a job from server side using graph API.
How does server side print is related to user 365 licenses ? Can I call graph API to print using a client credential token ?
Can I print using a jwt token obtained from a b2c domain ?
Thank you
Enrico
How does server side print is related to user 365 licenses ? Can I call graph API to print using a client credential token ?
Can I print using a jwt token obtained from a b2c domain ?
Thank you
Enrico
5 Replies
Sort By
- Saurabh_Bansal
Microsoft
Sabbadino2 To use the Print API from Microsoft Graph, you will need the user's token. This user should have access to Universal Print and the printer to which print job is being redirected to. For reference, please check out:
- Video - https://aka.ms/upbuildvideo
- Code Sample - https://aka.ms/upsample
- Graph API docs - https://docs.microsoft.com/graph/api/resources/printjob?view=graph-rest-beta
Hope this helps.
Thx, Saurabh
- Sabbadino2Copper ContributorHi, thank you for your answer.
Does a b2c user token works ? Or a b2b AD user token is needed ?
Our application must support different identity providers, does setting up a shared AD user and getting a token via ropc flow will work ?
Thank you.
Enrico- Jimmy_Wu
Microsoft
Sabbadino2, if I understand your scenario correctly, you are developing an app that is able to connect to different identity providers, one of which is AAD. Universal Print currently only support AAD user tokens. So, how I currently see the application working is the following:
- App prompts user for the AAD user credentials to retrieve user's AAD access token
- App uses the user's AAD access token to call Universal Print Graph APIs
Regarding B2B AAD user account support, if the AAD tenant is configured to support B2B user accounts and the B2B user account has been issued a license for Universal Print, along with corresponding printer permissions, then using the B2B user's AAD access token should work.
HTH,
Jimmy