Setting up Universal Print in Microsoft Azure
Log in to the Microsoft Azure portal and go to App registrations.
Click New Registration and fill in the new app details:
Name - The name for this application (this can be changed later). For example, MyQ UP.
Supported account types - Who can use this application or access this API? Select the Accounts in any organizational directory (Any Azure AD directory - Multitenant) option.
Redirect URI (optional) - The authentication response is returned to this URI after successfully authenticating the user. Select the Public client/native (mobile&desktop) option from the drop-down.
Click Register.
The new app overview page opens. Copy the Application (client) ID and the Directory (tenant) ID, as they are needed for the connection to MyQ.
On the left-hand menu, click Manifest and modify the **requiredResourcesAccess, replyUrlsWithType, allowPublicClient sections, according to the following:
CODE"allowPublicClient": true, "replyUrlsWithType": [ { "url": "https://login.live.com/oauth20_desktop.srf", "type": "InstalledClient" } ], "requiredResourceAccess": [ { "resourceAppId": "00000003-0000-0000-c000-000000000000", "resourceAccess": [ { "id": "93dae4bd-43a1-4a23-9a1a-92957e1d9121", "type": "Scope" }, { "id": "06ceea37-85e2-40d7-bec3-91337a46038f", "type": "Scope" }, { "id": "7427e0e9-2fba-42fe-b0c0-848c9e6a8182", "type": "Scope" } ] }, { "resourceAppId": "da9b70f6-5323-4ce6-ae5c-88dcc5082966", "resourceAccess": [ { "id": "3e306194-d6c5-43ad-afbb-0e7b16a9c10b", "type": "Scope" }, { "id": "1c90a3a7-465b-49c4-adcc-c8ac83d3d3f8", "type": "Role" }, { "id": "2b1bdd6b-9a0f-47c6-a806-b3e20cfd07a8", "type": "Role" }, { "id": "b695614a-52ec-4835-9e13-bdf5ff4c7448", "type": "Role" }, { "id": "11f87dac-027f-4d76-bd29-1ea1536b93da", "type": "Role" } ] } ]
On the left-hand menu, click API permissions and click Grant admin consent for the scopes seen in the image below:
Go to Universal Print and enable Document Conversion.
** The changes in the JSON settings in step 4, set the required scopes for Universal Printing and change the application to be treated as public (Needed for requesting device code).
The table below shows the details of the required scopes:
Scope ID | Description |
---|---|
06ceea37-85e2-40d7-bec3-91337a46038f | Microsoft Graph: PrintShare.ReadWrite.All Read and write printer shares |
7427e0e9-2fba-42fe-b0c0-848c9e6a8182 | Microsoft Graph: offline_access Allows MyQ to request the Access token via the complete MS OAuth2 flow only once, and then use Refresh token to exchange it for the Access token. |
93dae4bd-43a1-4a23-9a1a-92957e1d9121 | Microsoft Graph: Printer.FullControl.All Register, read, update, and unregister printers |
3e306194-d6c5-43ad-afbb-0e7b16a9c10b | UP: Printers.Create Create (Register) printers |
1c90a3a7-465b-49c4-adcc-c8ac83d3d3f8 | UP: PrinterProperties.ReadWrite Read and write the properties and attributes of printers. |
2b1bdd6b-9a0f-47c6-a806-b3e20cfd07a8 | UP: Printers.Read Read printers |
b695614a-52ec-4835-9e13-bdf5ff4c7448 | UP: PrintJob.Read Read the metadata and payload of users' print jobs. |
11f87dac-027f-4d76-bd29-1ea1536b93da | UP: PrintJob.ReadWriteBasic Read and write the metadata of users' print jobs. |