Question: So, I'm trying to replicate the "Floyd–Steinberg dithering" on an image, in python, and so far this what I have donne:

```
import cv2

# returns an array with rgb values of all pixels
x_img = cv2.imread("lenac.tif")

# returns an image with the rgb values turned to black and white
x_img_g = cv2.cvtColor(x_img,cv2.COLOR_BGR2GRAY)

def dither(img):

    col = len(img[0])
    li = len(img)

    print(col)
    print(li)

    for i in range (li):
        for j in range(col):

            oldpixel = img[li][col]
            newpixel = quantificacao(oldpixel)

            print(newpixel)

print(dither(x_img_g))

```

So basically the method is not finished and the only thing it is doing, is going trough every and each pixel of a black and white version on the "lena.tif" image (very famous in image manipulation), and aplying to them a method called "quantificacao", irrelevant to the question.

The image is, 512 x 512

Everything goes fine, until at a given point the following error pops up:

```
oldpixel = img[li][col]

IndexError: index 512 is out of bounds for axis 0 with size 512

```

Both the variables `col` and `li`, are shown to be 512, so, the `for cycle` should go from 0 to 511 right?

Therefore only indexing till 511

I'm kinda lost in these one, and would be extremely garteful if someone could help me

Answer: 
> 
> Considering, you already know [how to get token](https://stackoverflow.com/questions/60436419/get-group-members-from-azure-ad-via-microsoft-graph/60437235#60437235). Now see below example
> 
> 
> 

If you want to fetch `employeeId` or `identities` or `officeLocation` using `Microsoft Graph API`. 
try following way:

***`Request:`*** 

```
https://graph.microsoft.com/v1.0/users?$select=employeeId ,identities ,officeLocation 

```

***`Response:`***

```
{
    "@odata.context": "https://graph.microsoft.com/v1.0/$metadata#users(employeeId,identities,officeLocation)",
    "@odata.nextLink": "https://graph.microsoft.com/v1.0/users?$select=employeeId+%2cidentities+%2cofficeLocation&$skiptoken=X%27445370740",
    "value": [
        {
            "employeeId": 0200010000001C3A54696E614068616E,
            "officeLocation": Redmond, Usa,
            "identities": [
                {
                    "signInType": "userPrincipalName",
                    "issuer": "someEmail.onmicrosoft.com",
                    "issuerAssignedId": "tenant.onmicrosoft.com"
                }
            ]
        }
}

```

See the screen shot below:

[![enter image description here](https://i.stack.imgur.com/UeBA9.png)](https://i.stack.imgur.com/UeBA9.png)

Please refer to [Official document](https://learn.microsoft.com/en-us/graph/query-parameters#select-parameter) if you need more details.
Thanks [Md Farid Uddin Kiron](https://stackoverflow.com/users/9663070/md-farid-uddin-kiron)

My workaround with all fields (without `mailboxSettings` because get error 403 access denied)

```
https://graph.microsoft.com/v1.0/me?$select=aboutMe,accountEnabled,ageGroup,assignedLicenses,assignedPlans,birthday,businessPhones,city,companyName,consentProvidedForMinor,country,createdDateTime,creationType,deletedDateTime,department,displayName,employeeId,faxNumber,givenName,hireDate,id,identities,imAddresses,mailNickname,mobilePhone,mySite,officeLocation,onPremisesDistinguishedName,onPremisesDomainName,onPremisesExtensionAttributes,onPremisesImmutableId,onPremisesLastSyncDateTime,onPremisesProvisioningErrors,onPremisesSamAccountName,onPremisesSecurityIdentifier,onPremisesSyncEnabled,onPremisesUserPrincipalName,otherMails,passwordPolicies,passwordProfile,pastProjects,postalCode,preferredDataLocation,preferredLanguage,preferredName,provisionedPlans,proxyAddresses,refreshTokensValidFromDateTime,responsibilities,schools,showInAddressList,skills,signInSessionsValidFromDateTime,state,streetAddress,surname,usageLocation,userPrincipalName,userType,interests,isResourceAccount,jobTitle,lastPasswordChangeDateTime,legalAgeGroupClassification,licenseAssignmentStates,mail

```