Connecting to Office 365 tenant
Before using any other commands of Cayosoft Graph Module, you need to connect to the Office 365 tenant.
To connect to Office 365 tenant with an account name and password or with multi-factor authentication (MFA), run this command from a Windows PowerShell ISE or command prompt (it does not have to be elevated):
Connect-CGraph
A Sign in to your account dialog would appear. Select or enter the name of the account and password.
Note: Operations, available with the Cayosoft Graph Module, are limited to the permissions, granted to the account. It is recommended to use account with the Global Administrator role to access all capabilities of Microsoft Graph through the Cayosoft Graph Module.
If your account is setup with MFA, follow the instructions on the dialog:
When connecting to the Office 365 tenant for the 1st time, a Permissions requested page would appear. Click Accept to allow Cayosoft Graph Module to perform operations, listed on the screen:
Connecting to Office 365 with a limited set of permissions
If you want to limit the set of operations, available to the Cayosoft Graph Module, you can specify the list of permissions in the Connect-CGraph call:
Connect-CGraph -Scope User.Read.All
To list multiple permissions, separate them by a comma ",".
To extend the list of available permissions, simply add them to the -Scope parameter on the next call to the Connect-CGraph command.
For the full list of permissions, see Microsoft Graph permissions reference.
Verifying Cayosoft Graph Module application registration
As a result of permission grant, a Cayosoft Graph Module would be added to the list of Enterprise Applications in Azure AD, as seen in https://portal.azure.com/, Azure Active Directory > Enterprise Applications:
Comments
0 comments
Please sign in to leave a comment.