Question: According to [this guide](https://learn.microsoft.com/en-us/graph/sdks/choose-authentication-providers?tabs=CS#usernamepassword-provider) there are a jillion ways to integrate, some of which are beyond my understanding, but they seem to require a Client Id which is created via portal.azure.com

When I log into that site, it says I don't have a subscription. I don't really want an azure subscription - I have an office 365 subscription already.

Is there a way to integrate with office 365 without an azure subscription or some way that means I don't have to pay for Azure?

I have a program that runs as a windows service that books something, and when it's completed I simply wanted to insert the booking automatically into my outlook calendar.

Answer: 
As you said the function that calls your `my_func` can change over time and start passing different values.

What you could do additionally in your code is to add `Literal` typing for your parameter

```py
from typing import Literal

def my_func(my_var: Literal['val1', 'val2']) -> str:
    if my_var == 'val1':
        return '1'
    elif my_var == 'val2':
        return '2'
    else:
        raise ValueError('Unsupported value')

```

That way developers will have highlighted code if they will try to call your function with different parameter:

[![enter image description here](https://i.stack.imgur.com/Em1Ea.png)](https://i.stack.imgur.com/Em1Ea.png)
In your first code, you expect the value of "my\_var" to be either "val1" or "val2". However, if the value provided is neither of the above, it raises an error. It is a good approach when expecting input from users. Rule number one, Never trust user input.

On the second function, you're only interested in the provided value "val1", otherwise, anything else is treated as "val2".

There are several instances that require either of the above functions.
Example 1:
You have a program where a user should choose a menu either cheese or chocolate. Here you have to apply function one since any other menu provided by the user will not be existing. The user will be limited to only those two options.

Example 2:
You have a program that asks a user whether to proceed or not. Here the options are, either reply with one to continue or reply with anything else to decline. That is where function2 comes into application.