Register Service (G4MSREGSVC)
Type choices, press Enter.
Microsoft ID . . . . . . . . . . > bvstone@bvstools.onmicrosoft.com
Service . . . . . . . . . . . . > *OFFICE365SMTP
Registration Method . . . . . . *WEB *WEB, *USERPW
Tenant . . . . . . . . . . . . . 'organizations'
Password . . . . . . . . . . . .
Additional Parameters
Register for Groups . . . . . . *NO *YES, *NO
Redo Registration . . . . . . . *NO *YES, *NO
CCSID . . . . . . . . . . . . . 1208 Number
Debug . . . . . . . . . . . . . *NO *YES, *NO, *ALL
Debug File . . . . . . . . . . .
Bottom
F3=Exit F4=Prompt F5=Refresh F12=Cancel F13=How to use this display
F24=More keys
The G4MSREGSVC command allows you to register a service with your Microsoft ID. Registering a service allows G4MS to access the functionality of this service for the ID specified using OAuth v2.0 security.
When this command is run you'll be presented with a URL to go to in your browser after first signing into your Microsoft account.
Next you'll be given a code to enter when asked. You will then be asked in the browser if you wish to grant access to G4MS to the specific service. Once complete, G4MS will have access to the particular service for your Microsoft ID.
See the example below for the flow you should expect.
Microsoft ID - Specify the Microsoft ID that you want to register a service for. Normally this is your Outlook address (including outlook.com).
Service - Specify the service to register.
Registration Method - If you want to try registering using a userid and password, specify *USERPW for this and enter the password for the account on the PASSWORD parameter. Otherwise leave this as *WEB.
Tenant - Normally this will be left as the default
Password - Enter the password for the account if registering using a password instead of the web method.
Register for Groups - Specify *YES if you would like to add the scopes/permissions for working with Groups.
Redo Registration - If you have previously registered and are re-registering because of an expired password or another update, specify *YES.
CCSID - Sepcify a CCSID to use for data conversions.
Debug - Specify *YES to turn on debugging.
Debug File - Enter the fully qualified name of the debug file you wish to use. If left blank, this value defaults to /tmp/g4ms_<id>_registerServiceDebug.txt.
Example of Registering the Microsoft Office 365 SMTP Application for Sending Email
The first thing you will want to do is issue the following command:
G4MSREGSVC ID(bvstone@bvstools.onmicrosoft.com) SERVICE(*OFFICE365SMTP)
This will present a screen similar to the following:
Click on the link (or copy and paste it if your 5250 emulator doesn't allow clickable links) and you'll be presented a link to click on to beging registration of the service from Microsoft.
Next you will be presented with a signon at Microsoft. Make sure to sign in with the same account you are registering. You will be asked to accept that G4MS from BVSTools will be able to send email on your behalf. You must select the option to allow this.
When this is complete you will be redirected back to BVSTools with a screen containing an authorization code.
Once you see the above screen, return to your green screen application where you are running the G4MSREGSVC command.
Press F6 and this should complete the registration for this particular user.
You are now ready to start using the Microsoft Service that was registered.