I am trying to assign managers to members in my organization via Graph API to Azure AD. I seem to have done everything according to the documentation, but I still get a Bad Request, can you spot what i'm doing wrong?
url = f'https://graph.microsoft.com/v1.0/users/{user_id}/manager/$ref'params = {"@odata.id":f"https://graph.microsoft.com/v1.0/users/{manager_id}"}response = requests.put(url, headers= headers, params= params)if response.status_code == 204: print(f'user {user_email} successfully transfered to leader {synergy_manager_email} from leader {ad_manager_email}')else: print(f'fail. user {user_email} transfer to leader {synergy_manager_email} from leader {ad_manager_email} returned status code:{response.status_code}')Thank you
I tried exactly what is described in the documentation and expected status code 204 in the response