Sample for granting consent to Exchange Web Services:
Connect-MgGraph -Scopes "DelegatedPermissionGrant.ReadWrite.All"
New-MgOauth2PermissionGrant -ClientId <APP REGISTRATION CLIENT ID> -ConsentType "Principal" -PrincipalId <USER OBJECT ID> -ResourceId "00000002-0000-0ff1-ce00-000000000000" -Scope "3b5f3d61-589b-4a3c-a359-5dd4b5ee5bd5"
Let us know if this answer was helpful to you or if you need additional assistance. If it was helpful, please remember to accept it and complete the quality survey so that others in the community with similar questions can more easily find and rate a solution.