Office365-REST-Python-Client icon indicating copy to clipboard operation
Office365-REST-Python-Client copied to clipboard

Attribute Error: 'NoneType' object has no attribute 'execute_query'

Open Jayasmita-AO opened this issue 3 years ago • 2 comments

client_credentials = ClientCredential(self.config['client_id'],self.config['client_secret']) self.ctx = ClientContext(self.config['site_url']).with_credentials(client_credentials) web = self.ctx.web self.ctx.load(web).execute_query()

execute_query() not working as load() is returning NoneType for all cases.

Jayasmita-AO avatar Sep 20 '22 11:09 Jayasmita-AO

Hi,

it seems the permissions have not been granted for provided AppPrincipal. Refer wiki page, namely steps 6-7 on how to grant the permissions per site collection (or tenant)

vgrem avatar Sep 21 '22 19:09 vgrem

I am working on 2 laptops. I have done the above steps on one of them, and it's working fine there. But it's not working on the second laptop and I am getting the same error.

Jayasmita-AO avatar Sep 23 '22 09:09 Jayasmita-AO