Server side printing

Copper Contributor
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
5 Replies

@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:

Hope this helps.

 

Thx, Saurabh

Hi, 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

@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

Hi Jimmy, thank you for your reply. My question was actually about b2c users.

My other question is related to the fact that openidconnect specs allows to get a user token using the ropc flow (server to server flow) in addition to the standard browser based flow. I wonder if a token obtained in this way will work; we cannot ask the user to login once in our application using our identity provider and then again to azure and to get a user token to print.
If a token obtained from ropc flow works, we could setup a single azure ad user and use it to do all the printing.
Thank you, enrico

@Sabbadino2 we havent validated if the b2c tokens work. In the current version, Universal Print is enabled for users who directly login and get their access token via Azure AD.

 

Thanks,

Saurabh